Mercurial > pidgin.yaz
changeset 30747:66c175a474a6
jabber: Fix the last commit to pass escaped text off to the core.
This probably fixes display of messages with <, >, &, etc in Pidgin.
Why does xmlnode_get_data_unescaped() exist if
xmlnode_get_data(<body>&</body>) returns "&". I couldn't find a
single entity that wasn't unescaped. Then again, we can't really
change the functioning of those two functions without breaking
the world.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Sat, 31 Jul 2010 20:58:10 +0000 |
parents | c492cef26b88 |
children | 00851eae12c7 |
files | libpurple/protocols/jabber/message.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/message.c Sat Jul 31 20:39:55 2010 +0000 +++ b/libpurple/protocols/jabber/message.c Sat Jul 31 20:58:10 2010 +0000 @@ -246,8 +246,6 @@ } } - purple_debug_warning("jabber CHAT", "MUC message: '%s', '%s'\n", - jm->xhtml, jm->body); if(jm->xhtml || jm->body) { if(jid->resource) serv_got_chat_in(jm->js->gc, chat->id, jid->resource, @@ -590,7 +588,9 @@ } else if(!strcmp(child->name, "body") && !strcmp(xmlns, NS_XMPP_CLIENT)) { if(!jm->body) { char *msg = xmlnode_get_data(child); - jm->body = purple_strdup_withhtml(msg); + char *escaped = purple_markup_escape_text(msg, -1); + jm->body = purple_strdup_withhtml(escaped); + g_free(escaped); g_free(msg); } } else if(!strcmp(child->name, "html") && !strcmp(xmlns, NS_XHTML_IM)) {