comparison src/server.c @ 10518:8ae540ad42e7

[gaim-migrate @ 11828] Escape invitation message text so invalid markup doesn't cause blank invitation dialogs. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 15 Jan 2005 16:53:55 +0000
parents 6a043ae92db6
children d5f2ebf79429
comparison
equal deleted inserted replaced
10517:461334f300d7 10518:8ae540ad42e7
1158 1158
1159 gaim_signal_emit(gaim_conversations_get_handle(), 1159 gaim_signal_emit(gaim_conversations_get_handle(),
1160 "chat-invited", account, who, name, message, data); 1160 "chat-invited", account, who, name, message, data);
1161 1161
1162 if (message != NULL) 1162 if (message != NULL)
1163 {
1164 char *escaped = g_markup_escape_text(message, -1);
1163 g_snprintf(buf2, sizeof(buf2), 1165 g_snprintf(buf2, sizeof(buf2),
1164 _("%s has invited %s to the chat room %s:\n<b>%s</b>"), 1166 _("%s has invited %s to the chat room %s:\n<b>%s</b>"),
1165 who, gaim_account_get_username(account), name, message); 1167 who, gaim_account_get_username(account), name, escaped);
1168 g_free(escaped);
1169 }
1166 else 1170 else
1167 g_snprintf(buf2, sizeof(buf2), 1171 g_snprintf(buf2, sizeof(buf2),
1168 _("%s has invited %s to the chat room %s\n"), 1172 _("%s has invited %s to the chat room %s\n"),
1169 who, gaim_account_get_username(account), name); 1173 who, gaim_account_get_username(account), name);
1170 1174