changeset 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 2bf82fdddf5e
children ab37a4cc477e
files src/conversation.c
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
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);