pidgin: a7d49884: jabber: Fix the last commit to pass esca...
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Sat Jul 31 17:00:27 EDT 2010
----------------------------------------------------------------------
Revision: a7d49884941697519567616ac54f4c2884df05e2
Parent: b8e6435cda8f181325f88d7a4ee4c2bb11ed648a
Author: darkrain42 at pidgin.im
Date: 07/31/10 16:58:10
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/a7d49884941697519567616ac54f4c2884df05e2
Changelog:
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.
Changes against parent b8e6435cda8f181325f88d7a4ee4c2bb11ed648a
patched libpurple/protocols/jabber/message.c
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/message.c 049717f56ad476bc62905eda2c7042bfc32cb3f4
+++ libpurple/protocols/jabber/message.c 413753d807ba9822e88eb6628fb0a82fccaffd25
@@ -246,8 +246,6 @@ static void handle_groupchat(JabberMessa
}
}
- 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 @@ void jabber_message_parse(JabberStream *
} 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)) {
More information about the Commits
mailing list