changeset 19223:c8f18378045c

Properly escape the chat-topics in the infopane. Fixes #1903.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Mon, 13 Aug 2007 01:04:20 +0000
parents 476e16ce29d0
children f0fc615c217d 829b00936eef
files pidgin/gtkconv.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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);