diff src/xmlnode.c @ 14171:d38d8716426c

[gaim-migrate @ 16821] Patch #1523103 ("Improved markup processing"): "This patch tries to handle all the html-entities (including stuff like &reg; and &#xx;) in gaim_markup_strip_html and gaim_unescape_html. This also allows fixing the issue with libxml2 where &amp; was being converted to &#38;." committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 18 Aug 2006 00:15:25 +0000
parents 8bda65b88e49
children
line wrap: on
line diff
--- a/src/xmlnode.c	Thu Aug 17 23:58:58 2006 +0000
+++ b/src/xmlnode.c	Fri Aug 18 00:15:25 2006 +0000
@@ -35,6 +35,7 @@
 #include <string.h>
 #include <glib.h>
 
+#include "util.h"
 #include "xmlnode.h"
 
 #ifdef _WIN32
@@ -406,6 +407,11 @@
 			char *attrib = g_malloc(attrib_len + 1);
 			memcpy(attrib, attributes[i+3], attrib_len);
 			attrib[attrib_len] = '\0';
+#ifdef HAVE_LIBXML
+			char *txt = attrib;
+			attrib = gaim_unescape_html(txt);
+			g_free(txt);
+#endif
 			xmlnode_set_attrib(node, attributes[i], attrib);
 			g_free(attrib);
 		}