diff libpurple/xmlnode.c @ 29753:05d727f76ca9

Combine the three purple_unescape_text()s into one. purple_unescape_text is like purple_unescape_html, except better. I say better, but really, what I should say is "libxml2 BLOWS", because of its crazy way of leaving attributes "unescaped".
author Paul Aurich <paul@darkrain42.org>
date Wed, 10 Feb 2010 04:05:50 +0000
parents e1c01f236674
children 77cd42f08ba1
line wrap: on
line diff
--- a/libpurple/xmlnode.c	Wed Feb 10 04:01:16 2010 +0000
+++ b/libpurple/xmlnode.c	Wed Feb 10 04:05:50 2010 +0000
@@ -545,31 +545,6 @@
 	return xml_with_declaration;
 }
 
-static char *purple_unescape_text(const char *in)
-{
-    GString *ret;
-    const char *c = in;
-
-    if (in == NULL)
-        return NULL;
-
-    ret = g_string_new("");
-    while (*c) {
-        int len;
-        const char *ent;
-
-        if ((ent = purple_markup_unescape_entity(c, &len)) != NULL) {
-            g_string_append(ret, ent);
-            c += len;
-        } else {
-            g_string_append_c(ret, *c);
-            c++;
-        }
-    }
-
-    return g_string_free(ret, FALSE);
-}
-
 struct _xmlnode_parser_data {
 	xmlnode *current;
 	gboolean error;