# HG changeset patch # User Paul Aurich # Date 1280609890 0 # Node ID 66c175a474a6ce7f1e1308d1b73836f072923557 # Parent c492cef26b88c0096e5967a79cfffb52c9fd02f7 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(&) 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. diff -r c492cef26b88 -r 66c175a474a6 libpurple/protocols/jabber/message.c --- 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)) {