diff -x config_inc.php -N -a --unified -r mantisbt/admin/schema.php mantisbt-diff/admin/schema.php
--- mantisbt/admin/schema.php	2008-12-02 14:59:34.000000000 -0500
+++ mantisbt-diff/admin/schema.php	2008-12-02 16:06:10.964976800 -0500
@@ -405,3 +405,9 @@
 $upgrade[] = Array( 'AddColumnSQL', Array( db_get_table( 'mantis_custom_field_table' ), "
   filter_by 		L 		NOTNULL DEFAULT \" '1' \"" ) );
 
+$upgrade[] = Array('CreateTableSQL',Array(db_get_table('mantis_custom_field_text_table'),"
+	field_id I  UNSIGNED NOTNULL PRIMARY DEFAULT '0',
+	bug_id I  UNSIGNED NOTNULL PRIMARY DEFAULT '0',
+	value XL NOTNULL DEFAULT \" '' \"
+	", Array('mysql' => 'TYPE=MyISAM', 'pgsql' => 'WITHOUT OIDS')));
+$upgrade[] = Array('CreateIndexSQL',Array('idx_custom_field_bug',db_get_table('mantis_custom_field_text_table'),'bug_id'));
diff -x config_inc.php -N -a --unified -r mantisbt/bug_view_advanced_page.php mantisbt-diff/bug_view_advanced_page.php
--- mantisbt/bug_view_advanced_page.php	2008-12-02 14:59:34.000000000 -0500
+++ mantisbt-diff/bug_view_advanced_page.php	2008-12-02 16:16:03.055870400 -0500
@@ -528,6 +528,8 @@
 <!-- Custom Fields -->
 <?php
 	$t_custom_fields_found = false;
+	$t_custom_fields_column = 0;
+	$t_custom_fields_text = Array();
 	$t_related_custom_field_ids = custom_field_get_linked_ids( $t_bug->project_id );
 	foreach( $t_related_custom_field_ids as $t_id ) {
 		if ( !custom_field_has_read_access( $t_id, $f_bug_id ) ) {
@@ -536,17 +538,49 @@
 
 		$t_custom_fields_found = true;
 		$t_def = custom_field_get_definition( $t_id );
+		
+		if($t_def['type'] == CUSTOM_FIELD_TYPE_TEXT) {
+			$t_custom_fields_text[] = $t_def;
+			continue; // Push all text custom field to their own line.
+		}
+		
+		if($t_custom_fields_column == 0) {
 ?>
 	<tr <?php echo helper_alternate_class() ?>>
+<?php	} ?>
 		<td class="category">
 			<?php echo string_display( lang_get_defaulted( $t_def['name'] ) ) ?>
 		</td>
-		<td colspan="5">
+		<td>
 		<?php print_custom_field_value( $t_def, $t_id, $f_bug_id ); ?>
 		</td>
+<?php	if($t_custom_fields_column == 2) { ?>
 	</tr>
-<?php
+<?php	}
+		$t_custom_fields_column++;
+		if( $t_custom_fields_column > 2 )
+			$t_custom_fields_column = 0;
 	} # foreach
+	
+	if( $t_custom_fields_column == 1 ) {
+		echo '<td colspan="4"></td></tr>';
+	} else if( $t_custom_fields_column == 2 ) {
+		echo '<td colspan="2"></td></tr>';
+	}
+	
+	foreach( $t_custom_fields_text as $t_def )
+	{
+?>
+	<tr <?php echo helper_alternate_class() ?>>
+		<td class="category">
+		<?php echo string_display( lang_get_defaulted( $t_def['name'] ) ) ?>
+		</td>
+		<td colspan="5">
+			<?php print_custom_field_value( $t_def, $t_id, $f_bug_id ); ?>
+		</td>
+	</tr>
+<?php
+	}
 ?>
 
 <?php if ( $t_custom_fields_found ) { ?>
diff -x config_inc.php -N -a --unified -r mantisbt/bug_view_page.php mantisbt-diff/bug_view_page.php
--- mantisbt/bug_view_page.php	2008-12-02 14:59:34.000000000 -0500
+++ mantisbt-diff/bug_view_page.php	2008-12-02 16:08:35.550398200 -0500
@@ -383,23 +383,59 @@
 <!-- Custom Fields -->
 <?php
 	$t_custom_fields_found = false;
+	$t_custom_fields_column = 0;
+	$t_custom_fields_text = Array();
 	$t_related_custom_field_ids = custom_field_get_linked_ids( $t_bug->project_id );
 	foreach( $t_related_custom_field_ids as $t_id ) {
+		if( $t_def['advanced'] || !custom_field_has_read_access( $t_id, $f_bug_id ) ) {
+			continue;
+		}
+		
+		$t_custom_fields_found = true;
 		$t_def = custom_field_get_definition( $t_id );
-		if( !$t_def['advanced'] && custom_field_has_read_access( $t_id, $f_bug_id ) ) {
-			$t_custom_fields_found = true;
+		
+		if($t_def['type'] == CUSTOM_FIELD_TYPE_TEXT) {
+			$t_custom_fields_text[] = $t_def;
+			continue; // Push all text custom field to their own line.
+		}
+
+		if($t_custom_fields_column == 0) {
 ?>
 	<tr <?php echo helper_alternate_class() ?>>
+<?php	} ?>
 		<td class="category">
 			<?php echo string_display( lang_get_defaulted( $t_def['name'] ) ) ?>
 		</td>
+		<td>
+			<?php print_custom_field_value( $t_def, $t_id, $f_bug_id ); ?>
+		</td>
+<?php	if($t_custom_fields_column == 2) { ?>
+	</tr>
+<?php	}
+		$t_custom_fields_column++;
+		if( $t_custom_fields_column > 2 )
+			$t_custom_fields_column = 0;
+	} # foreach
+	
+	if( $t_custom_fields_column == 1 ) {
+		echo '<td colspan="4"></td></tr>';
+	} else if( $t_custom_fields_column == 2 ) {
+		echo '<td colspan="2"></td></tr>';
+	}
+	
+	foreach( $t_custom_fields_text as $t_def )
+	{
+?>
+	<tr <?php echo helper_alternate_class() ?>>
+		<td class="category">
+		<?php echo string_display( lang_get_defaulted( $t_def['name'] ) ) ?>
+		</td>
 		<td colspan="5">
 			<?php print_custom_field_value( $t_def, $t_id, $f_bug_id ); ?>
 		</td>
 	</tr>
 <?php
-		} # !$t_def['advanced'] && has read access
-	} # foreach
+	}
 ?>
 
 
diff -x config_inc.php -N -a --unified -r mantisbt/config_defaults_inc.php mantisbt-diff/config_defaults_inc.php
--- mantisbt/config_defaults_inc.php	2008-12-02 14:59:34.000000000 -0500
+++ mantisbt-diff/config_defaults_inc.php	2008-12-02 16:09:28.453600800 -0500
@@ -1478,6 +1478,7 @@
 	$g_db_table['mantis_custom_field_project_table']	= '%db_table_prefix%_custom_field_project%db_table_suffix%';
 	$g_db_table['mantis_custom_field_table']      	    = '%db_table_prefix%_custom_field%db_table_suffix%';
 	$g_db_table['mantis_custom_field_string_table']    = '%db_table_prefix%_custom_field_string%db_table_suffix%';
+	$g_db_table['mantis_custom_field_text_table']		= '%db_table_prefix%_custom_field_text%db_table_suffix%';
 	$g_db_table['mantis_upgrade_table']					= '%db_table_prefix%_upgrade%db_table_suffix%';
 	$g_db_table['mantis_filters_table']					= '%db_table_prefix%_filters%db_table_suffix%';
 	$g_db_table['mantis_sponsorship_table']				= '%db_table_prefix%_sponsorship%db_table_suffix%';
@@ -1512,7 +1513,7 @@
 	$g_eta_enum_string					= '10:none,20:< 1 day,30:2-3 days,40:< 1 week,50:< 1 month,60:> 1 month';
 	$g_sponsorship_enum_string          = '0:Unpaid,1:Requested,2:Paid';
 
-	$g_custom_field_type_enum_string    = '0:string,1:numeric,2:float,3:enum,4:email,5:checkbox,6:list,7:multiselection list,8:date,9:radio';
+	$g_custom_field_type_enum_string    = '0:string,1:numeric,2:float,3:enum,4:email,5:checkbox,6:list,7:multiselection list,8:date,9:radio,10:text';
 
 	#############################
 	# MantisBT Javascript Variables
diff -x config_inc.php -N -a --unified -r mantisbt/core/cfdefs/cfdef_standard.php mantisbt-diff/core/cfdefs/cfdef_standard.php
--- mantisbt/core/cfdefs/cfdef_standard.php	2008-12-02 14:59:34.000000000 -0500
+++ mantisbt-diff/core/cfdefs/cfdef_standard.php	2008-12-02 16:09:58.608113800 -0500
@@ -162,6 +162,20 @@
 	'#function_string_value_for_email' => 'cfdef_prepare_date_value_for_email',
 );
 
+$g_custom_field_type_definition[ CUSTOM_FIELD_TYPE_TEXT ] = array ( 
+	'#display_possible_values' => FALSE,
+	'#display_valid_regexp' => TRUE,
+	'#display_length_min' => FALSE,
+	'#display_length_max' => FALSE,
+	'#display_default_value' => TRUE,
+	'#function_return_distinct_values' => null,
+	'#function_value_to_database' => null,
+	'#function_database_to_value' => null,
+	'#function_print_input' => 'cfdef_input_textarea',
+	'#function_string_value' => null,
+	'#function_string_value_for_email' => null,
+);
+
 function cfdef_prepare_list_database_to_value($p_value) {
 	return str_replace( '||', '', '|' . $p_value . '|' );
 }
@@ -296,6 +310,12 @@
 	echo ' value="' . $t_custom_field_value .'"></input>';
 }
 
+function cfdef_input_textarea($p_field_def, $t_custom_field_value) {
+	echo '<textarea ', helper_get_tab_index(), ' name="custom_field_' . $p_field_def['id'] . '" cols="80" rows="10">';
+	echo $t_custom_field_value;
+	echo '</textarea>';
+}
+
 /**
  * Prints the controls for the date selector.
  *
diff -x config_inc.php -N -a --unified -r mantisbt/core/constant_inc.php mantisbt-diff/core/constant_inc.php
--- mantisbt/core/constant_inc.php	2008-12-02 14:59:34.000000000 -0500
+++ mantisbt-diff/core/constant_inc.php	2008-12-02 16:10:21.684909500 -0500
@@ -373,6 +373,7 @@
 define( 'CUSTOM_FIELD_TYPE_MULTILIST', 7 );
 define( 'CUSTOM_FIELD_TYPE_DATE', 8 );
 define( 'CUSTOM_FIELD_TYPE_RADIO', 9 );
+define( 'CUSTOM_FIELD_TYPE_TEXT', 10 );
 
 # Meta filter values
 define( 'META_FILTER_MYSELF', -1 );
diff -x config_inc.php -N -a --unified -r mantisbt/core/custom_field_api.php mantisbt-diff/core/custom_field_api.php
--- mantisbt/core/custom_field_api.php	2008-12-02 14:59:34.000000000 -0500
+++ mantisbt-diff/core/custom_field_api.php	2008-12-02 16:12:24.084108900 -0500
@@ -55,6 +55,7 @@
 $g_custom_field_types[CUSTOM_FIELD_TYPE_LIST] = 'standard';
 $g_custom_field_types[CUSTOM_FIELD_TYPE_MULTILIST] = 'standard';
 $g_custom_field_types[CUSTOM_FIELD_TYPE_DATE] = 'standard';
+$g_custom_field_types[CUSTOM_FIELD_TYPE_TEXT] = 'standard';
 
 foreach( $g_custom_field_types as $type ) {
 	require_once( $t_core_dir . 'cfdefs' . DIRECTORY_SEPARATOR . 'cfdef_' . $type . '.php' );
@@ -709,6 +710,12 @@
 				  WHERE field_id=" . db_param();
 	db_query_bound( $query, Array( $c_field_id ) );
 
+	#delete all text values
+ 	$t_custom_field_text_table = db_get_table( 'mantis_custom_field_text_table' );
+	$query = "DELETE FROM $t_custom_field_text_table
+			  WHERE field_id=" . db_param();
+	db_query_bound( $query, Array( $c_field_id ) );
+	
 	# delete all project associations
 	$t_custom_field_project_table = db_get_table( 'mantis_custom_field_project_table' );
 	$query = "DELETE FROM $t_custom_field_project_table
@@ -767,6 +774,11 @@
 				  WHERE bug_id='$c_bug_id'";
 	db_query( $query );
 
+	$t_custom_field_text_table = db_get_table( 'mantis_custom_field_text_table' );
+	$query = "DELETE FROM $t_custom_field_text_table
+				  WHERE bug_id='$c_bug_id'";
+	db_query( $query );
+	
 	# db_query errors on failure so:
 	return true;
 }
@@ -1000,14 +1012,19 @@
 
 	$t_access_level_r = $row['access_level_r'];
 	$t_default_value = $row['default_value'];
+	$t_type = $row['type'];
 
 	if( !custom_field_has_read_access( $p_field_id, $p_bug_id, auth_get_current_user_id() ) ) {
 		return false;
 	}
 
-	$t_custom_field_string_table = db_get_table( 'mantis_custom_field_string_table' );
+	if( $t_type == CUSTOM_FIELD_TYPE_TEXT ) {
+		$t_custom_field_value_table = db_get_table( 'mantis_custom_field_text_table' );
+	} else {
+		$t_custom_field_value_table = db_get_table( 'mantis_custom_field_string_table' );
+	}
 	$query = "SELECT value
-				  FROM $t_custom_field_string_table
+				  FROM $t_custom_field_value_table
 				  WHERE bug_id=" . db_param() . " AND
 				  		field_id=" . db_param();
 	$result = db_query_bound( $query, Array( $c_bug_id, $c_field_id ) );
@@ -1064,12 +1081,16 @@
 		$t_custom_field_project_table = db_get_table( 'mantis_custom_field_project_table' );
 		$t_custom_field_table = db_get_table( 'mantis_custom_field_table' );
 		$t_custom_field_string_table = db_get_table( 'mantis_custom_field_string_table' );
-
-		$query = "SELECT f.name, f.type, f.access_level_r, f.default_value, f.type, s.value
+		$t_custom_field_text_table    = db_get_table( 'mantis_custom_field_text_table' );
+		$t_custom_field_type_text	  = CUSTOM_FIELD_TYPE_TEXT;
+		
+		$query = "SELECT f.name, f.type, f.access_level_r, f.default_value, f.type, COALESCE(t.value, s.value) value
 					FROM $t_custom_field_project_table p INNER JOIN $t_custom_field_table f
 						ON p.field_id = f.id
 					LEFT JOIN $t_custom_field_string_table s
 						ON  p.field_id=s.field_id AND s.bug_id='$c_bug_id'
+					LEFT JOIN $t_custom_field_text_table t
+						ON  p.field_id=t.field_id AND t.bug_id='$c_bug_id'
 					WHERE   p.project_id = '$c_project_id'
 					ORDER BY p.sequence ASC, f.name ASC";
 
@@ -1321,7 +1342,7 @@
 	$t_length_max = $row['length_max'];
 	$t_default_value = $row['default_value'];
 
-	$c_value = db_prepare_string( custom_field_value_to_database( $p_value, $t_type ) );
+	$c_value = custom_field_value_to_database( $p_value, $t_type );
 
 	# check for valid value
 	if( !is_blank( $t_valid_regexp ) ) {
@@ -1344,19 +1365,25 @@
 
 	$t_custom_field_string_table = db_get_table( 'mantis_custom_field_string_table' );
 
+	if( $t_type == CUSTOM_FIELD_TYPE_TEXT ) {
+		$t_custom_field_value_table = db_get_table( 'mantis_custom_field_text_table' );
+	} else {
+		$t_custom_field_value_table = db_get_table( 'mantis_custom_field_string_table' );
+	}
+	
 	# do I need to update or insert this value?
 	$query = "SELECT value
-				  FROM $t_custom_field_string_table
-				  WHERE field_id='$c_field_id' AND
-				  		bug_id='$c_bug_id'";
-	$result = db_query( $query );
-
+				  FROM $t_custom_field_value_table
+				  WHERE field_id=" . db_param() . " AND
+				  		bug_id=" . db_param();
+	$result = db_query_bound( $query, Array( $c_field_id, $c_bug_id ) );
+	
 	if( db_num_rows( $result ) > 0 ) {
-		$query = "UPDATE $t_custom_field_string_table
-					  SET value='$c_value'
-					  WHERE field_id='$c_field_id' AND
-					  		bug_id='$c_bug_id'";
-		db_query( $query );
+		$query = "UPDATE $t_custom_field_value_table
+					  SET value=" . db_param() . "
+					  WHERE field_id=" . db_param() . " AND
+					  		bug_id=" . db_param();
+		db_query_bound( $query, Array( $c_value, $c_field_id, $c_bug_id ) );
 
 		$row = db_fetch_array( $result );
 		history_log_event_direct( $c_bug_id, $t_name, custom_field_database_to_value( $row['value'], $t_type ), $p_value );
@@ -1364,11 +1391,11 @@
 		# Always store the value, even if it's the dafault value
 		# This is important, as the definitions might change but the
 		#  values stored with a bug must not change
-		$query = "INSERT INTO $t_custom_field_string_table
+		$query = "INSERT INTO $t_custom_field_value_table
 						( field_id, bug_id, value )
 					  VALUES
-						( '$c_field_id', '$c_bug_id', '$c_value' )";
-		db_query( $query );
+						( " . db_param() . ", " . db_param() . ", " . db_param() . " )";
+		db_query_bound( $query, Array( $c_field_id, $c_bug_id, $c_value ) );
 		history_log_event_direct( $c_bug_id, $t_name, '', $p_value );
 	}
 
diff -x config_inc.php -N -a --unified -r mantisbt/core/filter_api.php mantisbt-diff/core/filter_api.php
--- mantisbt/core/filter_api.php	2008-12-02 14:59:34.000000000 -0500
+++ mantisbt-diff/core/filter_api.php	2008-12-02 16:13:27.283593400 -0500
@@ -1726,7 +1726,7 @@
 
 		foreach( $t_custom_fields as $t_cfid ) {
 			$t_field_info = custom_field_cache_row( $t_cfid, true );
-			if( !$t_field_info['filter_by'] ) {
+			if( !$t_field_info['filter_by'] || $t_def['type'] == CUSTOM_FIELD_TYPE_TEXT ) {
 				continue;
 
 				# skip this custom field it shouldn't be filterable
@@ -1979,6 +1979,13 @@
 
 			foreach( $t_custom_fields as $t_cfid ) {
 				$t_field_info = custom_field_cache_row( $t_cfid, true );
+				
+				if( !$t_field_info['filter_by'] || $t_def['type'] == CUSTOM_FIELD_TYPE_TEXT ) {
+					continue;
+
+					# skip this custom field it shouldn't be filterable
+				}
+
 				if( $t_field_info['access_level_r'] <= $t_current_user_access_level && $t_field_info['filter_by'] ) {
 					$t_accessible_custom_fields_ids[] = $t_cfid;
 					$t_accessible_custom_fields_names[] = $t_field_info['name'];
diff -x config_inc.php -N -a --unified -r mantisbt/lang/strings_english.txt mantisbt-diff/lang/strings_english.txt
--- mantisbt/lang/strings_english.txt	2008-12-02 14:59:34.000000000 -0500
+++ mantisbt-diff/lang/strings_english.txt	2008-12-02 16:13:57.969325800 -0500
@@ -1298,7 +1298,7 @@
 $s_linked_projects = 'Linked Projects';
 
 $s_custom_field_sequence = 'Sequence';
-$s_custom_field_type_enum_string = '0:String,1:Numeric,2:Float,3:Enumeration,4:E-mail,5:Checkbox,6:List,7:Multiselection list,8:Date,9:Radio';
+$s_custom_field_type_enum_string = '0:String,1:Numeric,2:Float,3:Enumeration,4:E-mail,5:Checkbox,6:List,7:Multiselection list,8:Date,9:Radio,10:Text';
 
 $s_confirm_used_custom_field_deletion = 'This field is currently linked to at least one project.  If you continue all values for this field will be permanently deleted.  This action cannot be undone.  If you do not want to delete this field, hit the Back button in your browser.  To proceed, click the button below';
 $s_confirm_custom_field_deletion = 'Are you sure you want to delete this custom field and all associated values?';
