# HG changeset patch # User Stu Tomlinson # Date 1111799927 0 # Node ID e84b1ef0190568be8b3c4d58a78710d98d75e0ae # Parent 969f35b31a49bc6eecec1503ecd1faa9851636ef [gaim-migrate @ 12331] Patch 2/4 committer: Tailor Script diff -r 969f35b31a49 -r e84b1ef01905 src/protocols/irc/msgs.c --- a/src/protocols/irc/msgs.c Fri Mar 25 22:54:28 2005 +0000 +++ b/src/protocols/irc/msgs.c Sat Mar 26 01:18:47 2005 +0000 @@ -56,11 +56,15 @@ static void irc_chat_remove_buddy(GaimConversation *convo, char *data[2]) { - char *message = g_strdup_printf("quit: %s", data[1]); + char *escaped, *message; + + escaped = g_markup_escape_text(data[1], -1); + message = g_strdup_printf("quit: %s", escaped); if (gaim_conv_chat_find_user(GAIM_CONV_CHAT(convo), data[0])) gaim_conv_chat_remove_user(GAIM_CONV_CHAT(convo), data[0], message); + g_free(escaped); g_free(message); } @@ -818,7 +822,7 @@ { GaimConnection *gc = gaim_account_get_connection(irc->account); GaimConversation *convo; - char *nick, *msg; + char *nick, *msg, *escaped; if (!args || !args[0] || !gc) return; @@ -829,17 +833,19 @@ return; } + escaped = (args[1] && *args[1]) ? g_markup_escape_text(args[1], -1) : NULL; nick = irc_mask_nick(from); if (!gaim_utf8_strcasecmp(nick, gaim_connection_get_display_name(gc))) { msg = g_strdup_printf(_("You have parted the channel%s%s"), (args[1] && *args[1]) ? ": " : "", - (args[1] && *args[1]) ? args[1] : ""); + (escaped && *escaped) ? escaped : ""); gaim_conv_chat_write(GAIM_CONV_CHAT(convo), args[0], msg, GAIM_MESSAGE_SYSTEM, time(NULL)); g_free(msg); serv_got_chat_left(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(convo))); } else { - gaim_conv_chat_remove_user(GAIM_CONV_CHAT(convo), nick, args[1]); + gaim_conv_chat_remove_user(GAIM_CONV_CHAT(convo), nick, escaped); } + g_free(escaped); g_free(nick); }