Mercurial > pidgin
comparison src/server.c @ 10733:d5f2ebf79429
[gaim-migrate @ 12335]
" This fixes one of the bugs decadix found. The symptom was
an empty box with two buttons: Cancel and Accept. For this
one, I believe the escaping belongs in this function and not
the prpls because that's how the escaping was being done
for message. I just added escaping on two other variables." --rlaager
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sat, 26 Mar 2005 03:08:03 +0000 |
parents | 8ae540ad42e7 |
children | 94cc67130789 |
comparison
equal
deleted
inserted
replaced
10732:c4cb90065e1d | 10733:d5f2ebf79429 |
---|---|
1151 const char *who, const char *message, GHashTable *data) | 1151 const char *who, const char *message, GHashTable *data) |
1152 { | 1152 { |
1153 GaimAccount *account; | 1153 GaimAccount *account; |
1154 char buf2[BUF_LONG]; | 1154 char buf2[BUF_LONG]; |
1155 struct chat_invite_data *cid = g_new0(struct chat_invite_data, 1); | 1155 struct chat_invite_data *cid = g_new0(struct chat_invite_data, 1); |
1156 char *name_escaped = g_markup_escape_text(name, -1); | |
1157 char *who_escaped = g_markup_escape_text(who, -1); | |
1156 | 1158 |
1157 account = gaim_connection_get_account(gc); | 1159 account = gaim_connection_get_account(gc); |
1158 | 1160 |
1159 gaim_signal_emit(gaim_conversations_get_handle(), | 1161 gaim_signal_emit(gaim_conversations_get_handle(), |
1160 "chat-invited", account, who, name, message, data); | 1162 "chat-invited", account, who, name, message, data); |
1161 | 1163 |
1162 if (message != NULL) | 1164 if (message != NULL) |
1163 { | 1165 { |
1164 char *escaped = g_markup_escape_text(message, -1); | 1166 char *message_escaped = g_markup_escape_text(message, -1); |
1165 g_snprintf(buf2, sizeof(buf2), | 1167 g_snprintf(buf2, sizeof(buf2), |
1166 _("%s has invited %s to the chat room %s:\n<b>%s</b>"), | 1168 _("%s has invited %s to the chat room %s:\n<b>%s</b>"), |
1167 who, gaim_account_get_username(account), name, escaped); | 1169 who_escaped, gaim_account_get_username(account), name_escaped, message_escaped); |
1168 g_free(escaped); | 1170 g_free(message_escaped); |
1169 } | 1171 } |
1170 else | 1172 else |
1171 g_snprintf(buf2, sizeof(buf2), | 1173 g_snprintf(buf2, sizeof(buf2), |
1172 _("%s has invited %s to the chat room %s\n"), | 1174 _("%s has invited %s to the chat room %s\n"), |
1173 who, gaim_account_get_username(account), name); | 1175 who_escaped, gaim_account_get_username(account), name_escaped); |
1176 | |
1177 g_free(name_escaped); | |
1178 g_free(who_escaped); | |
1174 | 1179 |
1175 cid->gc = gc; | 1180 cid->gc = gc; |
1176 cid->components = data; | 1181 cid->components = data; |
1177 | 1182 |
1178 gaim_request_accept_cancel(gc, NULL, _("Accept chat invitation?"), buf2, | 1183 gaim_request_accept_cancel(gc, NULL, _("Accept chat invitation?"), buf2, |