Properly escape the chat-topics in the infopane. Fixes #1903.

Mon, 13 Aug 2007 01:04:20 +0000

author
Sadrul Habib Chowdhury <sadrul@pidgin.im>
date
Mon, 13 Aug 2007 01:04:20 +0000
changeset 19364
c6d1c1f5bb8e
parent 19363
6e3560ac5998
child 19365
a712e2406c7e
child 19502
c289a0aab682

Properly escape the chat-topics in the infopane. Fixes #1903.

pidgin/gtkconv.c file | annotate | diff | comparison | revisions
--- a/pidgin/gtkconv.c	Mon Aug 13 00:52:41 2007 +0000
+++ b/pidgin/gtkconv.c	Mon Aug 13 01:04:20 2007 +0000
@@ -6294,11 +6294,13 @@
 		} else if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) {
 			PurpleConvChat *chat = PURPLE_CONV_CHAT(conv);
 			const char *topic = purple_conv_chat_get_topic(chat);
+			char *esc = topic ? g_markup_escape_text(topic, -1) : NULL;
 			markup = g_strdup_printf("%s%s<span color='%s' size='smaller'>%s</span>",
 						purple_conversation_get_title(conv),
-						topic ? "\n" : "",
+						esc ? "\n" : "",
 						pidgin_get_dim_grey_string(gtkconv->infopane),
-						topic ? topic : "");
+						esc ? esc : "");
+			g_free(esc);
 		}
 		gtk_list_store_set(gtkconv->infopane_model, &(gtkconv->infopane_iter),
 				CONV_TEXT_COLUMN, markup, -1);

mercurial