Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-exchange/ChangeLog,v
retrieving revision 1.471
diff -u -p -r1.471 ChangeLog
--- ChangeLog	27 Feb 2006 14:57:09 -0000	1.471
+++ ChangeLog	4 Mar 2006 08:45:31 -0000
@@ -1,3 +1,10 @@
+2006-03-03  Sankar P  <psankar@novell.com>
+
+	* camel/camel-exchange-folder.c:
+	(append_message): Substitutes characters troubling HTTP-url-creation, 
+			  like TAB, with a blank.
+	Fixes #271567 and a bunch of its duplicates.		  
+
 2006-02-27  Sushma Rai  <rsushma@novell.com>
 
 	* configure.in : Bumped the version to 2.5.92
Index: camel/camel-exchange-folder.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/camel/camel-exchange-folder.c,v
retrieving revision 1.22
diff -u -p -r1.22 camel-exchange-folder.c
--- camel/camel-exchange-folder.c	10 Jan 2006 08:20:23 -0000	1.22
+++ camel/camel-exchange-folder.c	4 Mar 2006 08:45:31 -0000
@@ -284,6 +284,33 @@ append_message (CamelFolder *folder, Cam
 	CamelStream *stream_mem;
 	CamelExchangeStore *store = CAMEL_EXCHANGE_STORE (folder->parent_store);
 
+	char *old_subject = NULL;
+	GString *new_subject;
+	int i, len;
+
+	/* 
+	   FIXME: We should add a top-level camel API camel_mime_message_prune_invalid_chars 
+	   which each of the provider will have to implement to remove things 
+	   that are invalid for their Transport mechanism. This will help in 
+	   avoiding  duplication of work. Now Sending and Importing both requires
+	   substitution of \t and \n with blank. 
+	*/
+	
+	old_subject = g_strdup(camel_mime_message_get_subject (message));
+	
+	if (old_subject) {
+		len = strlen (old_subject);
+		new_subject = g_string_new("");
+		for (i = 0; i < len; i++) 
+			if ((old_subject[i] != '\t') && (old_subject[i] != '\n'))
+				new_subject = g_string_append_c (new_subject, old_subject[i]);
+			else
+				new_subject = g_string_append_c (new_subject, ' ');
+		camel_mime_message_set_subject (message, new_subject->str);
+		g_free (old_subject);
+		g_free (new_subject);
+	}	
+
 	if (!camel_exchange_store_connected (store, ex)) {
 		camel_exchange_journal_append ((CamelExchangeJournal *) ((CamelExchangeFolder *)folder)->journal, message, info, appended_uid, ex);
 		return;
