# HG changeset patch # User Nathan Walp # Date 1050785930 0 # Node ID 1c739f2ce94f436704a98eb19f31f73412a801a9 # Parent 6911a84cbab159165788b7553d2e74bad0c061b4 [gaim-migrate @ 5541] this will fix gaim's parsing of urls with & in them, when they're sent properly as winaim does, and as gaim does over jabber. committer: Tailor Script diff -r 6911a84cbab1 -r 1c739f2ce94f src/gtkimhtml.c --- a/src/gtkimhtml.c Sat Apr 19 17:00:40 2003 +0000 +++ b/src/gtkimhtml.c Sat Apr 19 20:58:50 2003 +0000 @@ -750,6 +750,10 @@ { gchar *t = tag; gchar *e, *a; + gchar *val; + gint len; + gchar c; + GString *ret; while (g_ascii_strncasecmp (t, opt, strlen (opt))) { gboolean quote = FALSE; @@ -773,13 +777,30 @@ while (*e && (*e != *(t - 1))) e++; if (*e == '\0') { return NULL; - } else - return g_strndup (a, e - a); + } else + val = g_strndup(a, e - a); } else { e = a = t; while (*e && !isspace ((gint) *e)) e++; - return g_strndup (a, e - a); + val = g_strndup(a, e - a); } + + ret = g_string_new(""); + e = val; + while(*e) { + if(gtk_imhtml_is_amp_escape(e, &c, &len)) { + ret = g_string_append_c(ret, c); + e += len; + } else { + ret = g_string_append_c(ret, *e); + e++; + } + } + + g_free(val); + val = ret->str; + g_string_free(ret, FALSE); + return val; }