diff libpurple/util.c @ 29293:68bc7c617fa0

Fix a corner case where purple_markup_html_to_xhtml generated malformed XHTML. <FONT>blah</FONT> would turn into x</span>. This is pretty bad, since that's what Adium passes to libpurple when the text had no markup, and is what causes XMPP messages sent in Adium to look like: <body>.</body><body xmlns='http://www.w3.org/1999/xhtml'>.</body>
author Paul Aurich <paul@darkrain42.org>
date Sun, 24 Jan 2010 05:15:33 +0000
parents dab0d17dc6c1
children 31d9677b0c36 422889fb57e0
line wrap: on
line diff
--- a/libpurple/util.c	Sun Jan 24 03:53:36 2010 +0000
+++ b/libpurple/util.c	Sun Jan 24 05:15:33 2010 +0000
@@ -1519,7 +1519,7 @@
 				if(tag) {
 					while(tags) {
 						struct purple_parse_tag *pt = tags->data;
-						if(xhtml)
+						if(xhtml && !pt->ignore)
 							g_string_append_printf(xhtml, "</%s>", pt->dest_tag);
 						if(plain && purple_strequal(pt->src_tag, "a")) {
 							/* if this is a link, we have to add the url to the plaintext, too */