File bnc-449916-task-memo-description.patch of Package evolution-data-server

Index: camel/providers/groupwise/camel-groupwise-folder.c
===================================================================
--- camel/providers/groupwise/camel-groupwise-folder.c	(revision 9780)
+++ camel/providers/groupwise/camel-groupwise-folder.c	(working copy)
@@ -2686,7 +2686,21 @@
 	g_string_append_printf (gstr, "UID:%s\n",e_gw_item_get_icalid (item));
 	g_string_append_printf (gstr, "DTSTART:%s\n",e_gw_item_get_start_date (item));
 	g_string_append_printf (gstr, "SUMMARY:%s\n", e_gw_item_get_subject (item));
-	g_string_append_printf (gstr, "DESCRIPTION:%s\n", e_gw_item_get_message (item));
+
+	temp = e_gw_item_get_message (item);
+	if (temp) {
+		g_string_append(gstr, "DESCRIPTION:");
+		while (*temp) {
+			if (*temp == '\n')
+				g_string_append(gstr, "\\n");
+			else
+				g_string_append_c(gstr, *temp);
+			temp++;
+		}
+		g_string_append(gstr, "\n");	
+	}
+	temp = NULL;
+
 	g_string_append_printf (gstr, "DTSTAMP:%s\n", e_gw_item_get_creation_date (item));
 	g_string_append_printf (gstr, "X-GWMESSAGEID:%s\n", e_gw_item_get_id (item));
 	g_string_append_printf (gstr, "X-GWSHOW-AS:BUSY\n");
@@ -2741,6 +2755,7 @@
 	EGwItemOrganizer *org = NULL;
 	GString *gstr = g_string_new (NULL);
 	char **tmp = NULL;
+	const char *temp = NULL;
 
 	tmp = g_strsplit (e_gw_item_get_id (item), "@", -1);
 
@@ -2750,7 +2765,21 @@
 	g_string_append_printf (gstr, "UID:%s\n",e_gw_item_get_icalid (item));
 	g_string_append_printf (gstr, "DTSTART:%s\n",e_gw_item_get_start_date (item));
 	g_string_append_printf (gstr, "SUMMARY:%s\n", e_gw_item_get_subject (item));
-	g_string_append_printf (gstr, "DESCRIPTION:%s\n", e_gw_item_get_message (item));
+
+	temp = e_gw_item_get_message (item);
+	if (temp) {
+		g_string_append(gstr, "DESCRIPTION:");
+		while (*temp) {
+			if (*temp == '\n')
+				g_string_append(gstr, "\\n");
+			else
+				g_string_append_c(gstr, *temp);
+			temp++;
+		}
+		g_string_append(gstr, "\n");	
+	}
+	temp = NULL;
+
 	g_string_append_printf (gstr, "DTSTAMP:%s\n", e_gw_item_get_creation_date (item));
 	g_string_append_printf (gstr, "X-GWMESSAGEID:%s\n", e_gw_item_get_id (item));
 	g_string_append_printf (gstr, "X-GWRECORDID:%s\n", tmp[0]);
openSUSE Build Service is sponsored by