# HG changeset patch # User Paul Aurich # Date 1264472296 0 # Node ID 5bacbd78e2b470ba12771ccb7e474733e66c1c8a # Parent 47f2c7291013335ea3dce8961e9b35238c2d7bd2 jabber: Wrap XHTML-IM messages in

for greater interoperability justice. Closes #11253 This is pretty simplistic, and doesn't check if the message already has a

, because fully checking that would require a lot more effort. diff -r 47f2c7291013 -r 5bacbd78e2b4 ChangeLog --- a/ChangeLog Sun Jan 24 22:49:33 2010 +0000 +++ b/ChangeLog Tue Jan 26 02:18:16 2010 +0000 @@ -3,6 +3,8 @@ version 2.6.6 (??/??/20??): libpurple: * Fix 'make check' on OS X. (David Fang) + * Fix a quirk in purple_markup_html_to_xhtml that caused some messages + to be improperly converted to XHTML. General: * Correctly disable all missing dependencies when using the @@ -27,6 +29,8 @@ * When getting info on a domain-only (server) JID, show uptime (when given by the result of the "last query") and don't show status as offline. + * Wrap XHTML messages in

, as described in XEP-0071, for compatibility + with some clients. Pidgin: * Correctly size conversation and status box entries when the diff -r 47f2c7291013 -r 5bacbd78e2b4 libpurple/protocols/jabber/message.c --- a/libpurple/protocols/jabber/message.c Sun Jan 24 22:49:33 2010 +0000 +++ b/libpurple/protocols/jabber/message.c Tue Jan 26 02:18:16 2010 +0000 @@ -1193,6 +1193,7 @@ tmp = purple_utf8_strip_unprintables(msg); purple_markup_html_to_xhtml(tmp, &xhtml, &jm->body); g_free(tmp); + tmp = jabber_message_smileyfy_xhtml(jm, xhtml); if (tmp) { g_free(xhtml); @@ -1206,7 +1207,8 @@ if (!jbr || !jbr->caps.info || jabber_resource_has_capability(jbr, NS_XHTML_IM)) { if (!jabber_xhtml_plain_equal(xhtml, jm->body)) - jm->xhtml = g_strdup_printf("%s", xhtml); + /* Wrap the message in

for great interoperability justice. */ + jm->xhtml = g_strdup_printf("

%s

", xhtml); } g_free(xhtml); @@ -1249,7 +1251,8 @@ } if (chat->xhtml && !jabber_xhtml_plain_equal(xhtml, jm->body)) - jm->xhtml = g_strdup_printf("%s", xhtml); + /* Wrap the message in

for greater interoperability justice. */ + jm->xhtml = g_strdup_printf("

%s

", xhtml); g_free(xhtml);