pidgin: 3bd2c7a6: jabber: Wrap XHTML-IM messages in <p/> f..
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Mon Jan 25 21:20:49 EST 2010
-----------------------------------------------------------------
Revision: 3bd2c7a6603e3818db5888eda798d4a336a3665b
Ancestor: bd3cbabd072080920b75ad5fa1659106b5a022f1
Author: darkrain42 at pidgin.im
Date: 2010-01-26T02:18:16
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/3bd2c7a6603e3818db5888eda798d4a336a3665b
Modified files:
ChangeLog libpurple/protocols/jabber/message.c
ChangeLog:
jabber: Wrap XHTML-IM messages in <p/> for greater interoperability justice. Closes #11253
This is pretty simplistic, and doesn't check if the message already has a <p/>,
because fully checking that would require a lot more effort.
-------------- next part --------------
============================================================
--- ChangeLog 63b87bc6999ae39fb08930ca61e9b9f55f7a85a0
+++ ChangeLog 30a9802a274b9166c99f01866969a39b21526c7c
@@ -3,6 +3,8 @@ version 2.6.6 (??/??/20??):
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 @@ version 2.6.6 (??/??/20??):
* 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 <p>, as described in XEP-0071, for compatibility
+ with some clients.
Pidgin:
* Correctly size conversation and status box entries when the
============================================================
--- libpurple/protocols/jabber/message.c a82d35fd7e226e872abf81ab50c2defd58c3bad8
+++ libpurple/protocols/jabber/message.c 0fbb879ce26e625a4965568890ed93c2ce689c73
@@ -1193,6 +1193,7 @@ int jabber_message_send_im(PurpleConnect
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 @@ int jabber_message_send_im(PurpleConnect
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("<html xmlns='" NS_XHTML_IM "'><body xmlns='" NS_XHTML "'>%s</body></html>", xhtml);
+ /* Wrap the message in <p/> for great interoperability justice. */
+ jm->xhtml = g_strdup_printf("<html xmlns='" NS_XHTML_IM "'><body xmlns='" NS_XHTML "'><p>%s</p></body></html>", xhtml);
}
g_free(xhtml);
@@ -1249,7 +1251,8 @@ int jabber_message_send_chat(PurpleConne
}
if (chat->xhtml && !jabber_xhtml_plain_equal(xhtml, jm->body))
- jm->xhtml = g_strdup_printf("<html xmlns='" NS_XHTML_IM "'><body xmlns='" NS_XHTML "'>%s</body></html>", xhtml);
+ /* Wrap the message in <p/> for greater interoperability justice. */
+ jm->xhtml = g_strdup_printf("<html xmlns='" NS_XHTML_IM "'><body xmlns='" NS_XHTML "'><p>%s</p></body></html>", xhtml);
g_free(xhtml);
More information about the Commits
mailing list