diff src/conversation.c @ 12840:12b23eaa4911

[gaim-migrate @ 15188] Fix an escaping issue reported in SF Bug #1220557. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Thu, 12 Jan 2006 01:50:44 +0000
parents eda1572c788b
children 49b2347863b2
line wrap: on
line diff
--- a/src/conversation.c	Thu Jan 12 01:26:51 2006 +0000
+++ b/src/conversation.c	Thu Jan 12 01:50:44 2006 +0000
@@ -1502,13 +1502,18 @@
 		aliases = g_list_prepend(aliases, (char *)alias);
 
 		if (!quiet && new_arrivals) {
+			char *escaped = g_markup_escape_text(alias, -1);
 			char *tmp;
 
 			if (extra_msg == NULL)
-				tmp = g_strdup_printf(_("%s entered the room."), alias);
-			else
+				tmp = g_strdup_printf(_("%s entered the room."), escaped);
+			else {
+				char *escaped2 = g_markup_escape_text(extra_msg, -1);
 				tmp = g_strdup_printf(_("%s [<I>%s</I>] entered the room."),
-									  alias, extra_msg);
+									  escaped, escaped2);
+				g_free(escaped2);
+			}
+			g_free(escaped);
 
 			gaim_conversation_write(conv, NULL, tmp, GAIM_MESSAGE_SYSTEM, time(NULL));
 			g_free(tmp);