# HG changeset patch # User Stu Tomlinson # Date 1194710345 0 # Node ID 39231317310a07ddd642cc5da1b6e2ff5ee9a364 # Parent 008cfc009d0e19210e4092287bb3f910ab13d55f Escape any un-escaped entities in purple_markup_html_to_xhtml when parsing out URLs, this prevents xmlnode errors and allows suppressing duplicate url because the check whether the description matches the url is now comparing apples to apples. I have no idea if this breaks a bunch of other things that assumed these entities do not get escaped. I'm sure we'll find out sooner or later. diff -r 008cfc009d0e -r 39231317310a libpurple/util.c --- a/libpurple/util.c Sat Nov 10 15:55:29 2007 +0000 +++ b/libpurple/util.c Sat Nov 10 15:59:05 2007 +0000 @@ -1555,7 +1555,11 @@ if(*q == '\'' || *q == '\"') q++; while(*q && *q != '\"' && *q != '\'' && *q != ' ') { - url = g_string_append_c(url, *q); + int len; + if ((*q == '&') && (purple_markup_unescape_entity(q, &len) == NULL)) + url = g_string_append(url, "&"); + else + url = g_string_append_c(url, *q); q++; } p = q;