im.pidgin.pidgin: e3fd21e6dabb99e5604e8337380353fcbe1a7279

nosnilmot at pidgin.im nosnilmot at pidgin.im
Sat Nov 10 11:46:35 EST 2007


-----------------------------------------------------------------
Revision: e3fd21e6dabb99e5604e8337380353fcbe1a7279
Ancestor: 72a1343e462f5a14ca174142fb419ed344fa6658
Author: nosnilmot at pidgin.im
Date: 2007-11-10T15:59:05
Branch: im.pidgin.pidgin

Modified files:
        libpurple/util.c

ChangeLog: 

Escape any un-escaped entities in purple_markup_html_to_xhtml when parsing
out URLs, this prevents xmlnode errors and allows suppressing duplicate
url <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.

-------------- next part --------------
============================================================
--- libpurple/util.c	fca4e3a1119db59f94f59157d19ade0e2a923cf5
+++ libpurple/util.c	4b9c47b49f09c05348b23abc64286f652299b2c6
@@ -1555,7 +1555,11 @@ purple_markup_html_to_xhtml(const char *
 							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, "&amp;");
+								else
+									url = g_string_append_c(url, *q);
 								q++;
 							}
 							p = q;


More information about the Commits mailing list