comparison src/protocols/irc/msgs.c @ 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 fcde3faa1f57
children 5ddae6fe983e
comparison
equal deleted inserted replaced
13393:b0dd97098699 13394:eb0ce960ff60
309 /* If this is an interactive update, print it out */ 309 /* If this is an interactive update, print it out */
310 tmp = g_markup_escape_text(topic, -1); 310 tmp = g_markup_escape_text(topic, -1);
311 tmp2 = gaim_markup_linkify(tmp); 311 tmp2 = gaim_markup_linkify(tmp);
312 g_free(tmp); 312 g_free(tmp);
313 if (!strcmp(name, "topic")) { 313 if (!strcmp(name, "topic")) {
314 char *nick_esc;
314 nick = irc_mask_nick(from); 315 nick = irc_mask_nick(from);
316 nick_esc = g_markup_escape_text(nick, -1);
315 gaim_conv_chat_set_topic(GAIM_CONV_CHAT(convo), nick, topic); 317 gaim_conv_chat_set_topic(GAIM_CONV_CHAT(convo), nick, topic);
316 msg = g_strdup_printf(_("%s has changed the topic to: %s"), nick, tmp2); 318 msg = g_strdup_printf(_("%s has changed the topic to: %s"), nick_esc, tmp2);
319 g_free(nick_esc);
317 g_free(nick); 320 g_free(nick);
318 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), from, msg, GAIM_MESSAGE_SYSTEM, time(NULL)); 321 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), from, msg, GAIM_MESSAGE_SYSTEM, time(NULL));
319 g_free(msg); 322 g_free(msg);
320 } else { 323 } else {
321 msg = g_strdup_printf(_("The topic for %s is: %s"), chan, tmp2); 324 char *chan_esc = g_markup_escape_text(chan, -1);
325 msg = g_strdup_printf(_("The topic for %s is: %s"), chan_esc, tmp2);
326 g_free(chan_esc);
322 gaim_conv_chat_set_topic(GAIM_CONV_CHAT(convo), NULL, topic); 327 gaim_conv_chat_set_topic(GAIM_CONV_CHAT(convo), NULL, topic);
323 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "", msg, GAIM_MESSAGE_SYSTEM, time(NULL)); 328 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), "", msg, GAIM_MESSAGE_SYSTEM, time(NULL));
324 g_free(msg); 329 g_free(msg);
325 } 330 }
326 g_free(tmp2); 331 g_free(tmp2);