From 9c6bce4c376a2add62ed8ce0b2fef36e171161ff Mon Sep 17 00:00:00 2001 From: Chenthill Palanisamy Date: Mon, 16 Oct 2006 18:15:43 +0000 Subject: Fixes #332101 svn path=/trunk/; revision=32902 --- calendar/gui/e-cal-component-memo-preview.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'calendar/gui/e-cal-component-memo-preview.c') diff --git a/calendar/gui/e-cal-component-memo-preview.c b/calendar/gui/e-cal-component-memo-preview.c index 9f235b16f4..192ad70ee1 100644 --- a/calendar/gui/e-cal-component-memo-preview.c +++ b/calendar/gui/e-cal-component-memo-preview.c @@ -158,7 +158,7 @@ write_html (GtkHTMLStream *stream, ECal *ecal, ECalComponent *comp, icaltimezone e_cal_component_get_categories_list (comp, &l); if (l) { GSList *node; - GString *string = g_string_new (""); + GString *string = g_string_new (NULL); gtk_html_stream_printf(stream, "

Categories: "); @@ -186,7 +186,9 @@ write_html (GtkHTMLStream *stream, ECal *ecal, ECalComponent *comp, icaltimezone } gtk_html_stream_printf(stream, string->str); - + + g_string_free (string, TRUE); + gtk_html_stream_printf(stream, "

"); e_cal_component_free_categories_list (l); @@ -220,17 +222,17 @@ write_html (GtkHTMLStream *stream, ECal *ecal, ECalComponent *comp, icaltimezone for (node = l; node != NULL; node = node->next) { gint i, j; - GString *string = g_string_new (""); + GString *string = g_string_new (NULL); text = * (ECalComponentText *) node->data; for (i = 0, j=0; i < strlen (text.value ? text.value : 0); i++, j++) { if (text.value[i] == '\n'){ - string = g_string_append (string, "
"); + string = g_string_append_len (string, "
", 4); } else if (text.value[i] == '<') - string = g_string_append (string, "<"); + string = g_string_append_len (string, "<", 4); else if (text.value[i] == '>') - string = g_string_append (string, ">"); + string = g_string_append_len (string, ">", 4); else string = g_string_append_c (string, text.value[i]); } -- cgit v1.2.3