comparison src/protocols/irc/cmds.c @ 10933:f43113333717

[gaim-migrate @ 12716] Fix bug 1207236 - Angle brackets invisible to self in emotes, we weren't escaping our own /me's before writing them to the conversation committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Mon, 23 May 2005 19:05:11 +0000
parents c4cb90065e1d
children 634fec5ed0f2
comparison
equal deleted inserted replaced
10932:3ad0e7351826 10933:f43113333717
72 } 72 }
73 73
74 int irc_cmd_ctcp_action(struct irc_conn *irc, const char *cmd, const char *target, const char **args) 74 int irc_cmd_ctcp_action(struct irc_conn *irc, const char *cmd, const char *target, const char **args)
75 { 75 {
76 GaimConnection *gc = gaim_account_get_connection(irc->account); 76 GaimConnection *gc = gaim_account_get_connection(irc->account);
77 char *action, *dst, **newargs; 77 char *action, *escaped, *dst, **newargs;
78 const char *src; 78 const char *src;
79 GaimConversation *convo; 79 GaimConversation *convo;
80 80
81 if (!args || !args[0] || !gc) 81 if (!args || !args[0] || !gc)
82 return 0; 82 return 0;
110 g_free(newargs[1]); 110 g_free(newargs[1]);
111 g_free(newargs); 111 g_free(newargs);
112 112
113 convo = gaim_find_conversation_with_account(GAIM_CONV_ANY, target, irc->account); 113 convo = gaim_find_conversation_with_account(GAIM_CONV_ANY, target, irc->account);
114 if (convo) { 114 if (convo) {
115 action = g_strdup_printf("/me %s", args[0]); 115 escaped = g_markup_escape_text(args[0], -1);
116 action = g_strdup_printf("/me %s", escaped);
117 g_free(escaped);
116 if (action[strlen(action) - 1] == '\n') 118 if (action[strlen(action) - 1] == '\n')
117 action[strlen(action) - 1] = '\0'; 119 action[strlen(action) - 1] = '\0';
118 if (gaim_conversation_get_type(convo) == GAIM_CONV_CHAT) 120 if (gaim_conversation_get_type(convo) == GAIM_CONV_CHAT)
119 serv_got_chat_in(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(convo)), 121 serv_got_chat_in(gc, gaim_conv_chat_get_id(GAIM_CONV_CHAT(convo)),
120 gaim_connection_get_display_name(gc), 122 gaim_connection_get_display_name(gc),