changeset 13394:eb0ce960ff60

[gaim-migrate @ 15767] It seems like we should escape the channel or nick when building the message. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Mon, 06 Mar 2006 02:22:15 +0000
parents b0dd97098699
children ff4e85e04adf
files src/protocols/irc/msgs.c
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/irc/msgs.c	Sat Mar 04 20:30:25 2006 +0000
+++ b/src/protocols/irc/msgs.c	Mon Mar 06 02:22:15 2006 +0000
@@ -311,14 +311,19 @@
 	tmp2 = gaim_markup_linkify(tmp);
 	g_free(tmp);
 	if (!strcmp(name, "topic")) {
+		char *nick_esc;
 		nick = irc_mask_nick(from);
+		nick_esc = g_markup_escape_text(nick, -1);
 		gaim_conv_chat_set_topic(GAIM_CONV_CHAT(convo), nick, topic);
-		msg = g_strdup_printf(_("%s has changed the topic to: %s"), nick, tmp2);
+		msg = g_strdup_printf(_("%s has changed the topic to: %s"), nick_esc, tmp2);
+		g_free(nick_esc);
 		g_free(nick);
 		gaim_conv_chat_write(GAIM_CONV_CHAT(convo), from, msg, GAIM_MESSAGE_SYSTEM, time(NULL));
 		g_free(msg);
 	} else {
-		msg = g_strdup_printf(_("The topic for %s is: %s"), chan, tmp2);
+		char *chan_esc = g_markup_escape_text(chan, -1);
+		msg = g_strdup_printf(_("The topic for %s is: %s"), chan_esc, tmp2);
+		g_free(chan_esc);
 		gaim_conv_chat_set_topic(GAIM_CONV_CHAT(convo), NULL, topic);
 		gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "", msg, GAIM_MESSAGE_SYSTEM, time(NULL));
 		g_free(msg);