# HG changeset patch # User Richard Laager # Date 1141611735 0 # Node ID eb0ce960ff602b4883e65b0adc4e1593d2cb3fff # Parent b0dd970986996fa6434c4f384b5f87429da549c8 [gaim-migrate @ 15767] It seems like we should escape the channel or nick when building the message. committer: Tailor Script diff -r b0dd97098699 -r eb0ce960ff60 src/protocols/irc/msgs.c --- 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);