Mon, 23 Dec 2024 22:25:00 -0600
Don't unescape html in purple_markup_linkify
Browsers typically don't care about this and doing so can causes issues for
user interfaces like Pidgin that are entering the text into GtkLabel's that
parse it in a similar fashion to HTML which causes issues as & becomes &.
Testing Done:
Sent a link to the exp1 issues from pidgin2 and was able to open it. Also called in the turtles for good measure.
Bugs closed: PIDGIN-17954
Reviewed at https://reviews.imfreedom.org/r/3701/
| libpurple/purplemarkup.c | file | annotate | diff | comparison | revisions |
--- a/libpurple/purplemarkup.c Mon Dec 23 20:44:41 2024 -0600 +++ b/libpurple/purplemarkup.c Mon Dec 23 22:25:00 2024 -0600 @@ -859,7 +859,7 @@ const char *urlprefix, int inside_paren) { - char *url_buf, *tmpurlbuf; + char *url_buf = NULL; const char *t; for (t = c;; t++) { @@ -879,11 +879,9 @@ t--; url_buf = g_strndup(c, t - c); - tmpurlbuf = purple_unescape_html(url_buf); g_string_append_printf(ret, "<a href=\"%s%s\">%s</a>", urlprefix, - tmpurlbuf, url_buf); - g_free(tmpurlbuf); + url_buf, url_buf); g_free(url_buf); return t; }