diff options
author | Paul Aurich <darkrain42@pidgin.im> | 2010-02-10 04:05:50 +0000 |
---|---|---|
committer | Paul Aurich <darkrain42@pidgin.im> | 2010-02-10 04:05:50 +0000 |
commit | c08148c31d5ab4705affe30702ae6d800cc0f6f9 (patch) | |
tree | 06f7aaa412115b0f6ee81e55cb64d3622a41095d /libpurple/xmlnode.c | |
parent | 1e359b0e49de792aa8ffe551412d62b32b3e6031 (diff) | |
download | pidgin-c08148c31d5ab4705affe30702ae6d800cc0f6f9.tar.gz |
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".
Diffstat (limited to 'libpurple/xmlnode.c')
-rw-r--r-- | libpurple/xmlnode.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/libpurple/xmlnode.c b/libpurple/xmlnode.c index 66e2ef4c08..eeab70c4c5 100644 --- a/libpurple/xmlnode.c +++ b/libpurple/xmlnode.c @@ -545,31 +545,6 @@ xmlnode_to_formatted_str(const xmlnode *node, int *len) 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; |