# HG changeset patch # User Paul Aurich # Date 1280608795 0 # Node ID c492cef26b88c0096e5967a79cfffb52c9fd02f7 # Parent a0d6b85e9c4235d899530dbbf08e63e015bacfa1 jabber: Only take the character data from a element (non-XHTML) rfc3921 and draft-ietf-xmpp-3921bis talk about the XML character data of the and 3921bis also says it MUST NOT contain mixed content (see 3.2.2 of the XML 1.0 spec). This should fix Google Talk's private chats showing an empty line whenever someone joins/leaves (caused by some ugly XMPP traffic from Google), and seems correct to me otherwise. This was changed from _get_data to _to_str 7 years ago in 76319226b46e6e64b1ef61933baeb43a5a484a61. diff -r a0d6b85e9c42 -r c492cef26b88 libpurple/protocols/jabber/message.c --- a/libpurple/protocols/jabber/message.c Sat Jul 31 20:18:59 2010 +0000 +++ b/libpurple/protocols/jabber/message.c Sat Jul 31 20:39:55 2010 +0000 @@ -246,6 +246,8 @@ } } + 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, @@ -587,7 +589,7 @@ jm->thread_id = xmlnode_get_data(child); } else if(!strcmp(child->name, "body") && !strcmp(xmlns, NS_XMPP_CLIENT)) { if(!jm->body) { - char *msg = xmlnode_to_str(child, NULL); + char *msg = xmlnode_get_data(child); jm->body = purple_strdup_withhtml(msg); g_free(msg); }