# HG changeset patch # User Paul Aurich # Date 1280609890 0 # Node ID 2482f350d8f5a6fb600821a8e8dbac2fca151942 # Parent 8a0729bb262498c6e499ac9845b187213b8492ee 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 8a0729bb2624 -r 2482f350d8f5 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)) {