im.pidgin.pidgin: bd554241acb7ec65bf15c42bef90dc7e10b9689f

nosnilmot at pidgin.im nosnilmot at pidgin.im
Fri Nov 9 12:40:37 EST 2007


-----------------------------------------------------------------
Revision: bd554241acb7ec65bf15c42bef90dc7e10b9689f
Ancestor: 75816a5c9fd2a269fff7d9de414833088ef32cda
Author: nosnilmot at pidgin.im
Date: 2007-11-09T17:37:12
Branch: im.pidgin.pidgin

Modified files:
        libpurple/util.c

ChangeLog: 

applied changes from f0cdd16c20f9773e28cd79b36ffcf1c66057e32e
             through c9a0fddea31ad4905f44cfed7fb0da7d6ff6eff4

References #2810

-------------- next part --------------
============================================================
--- libpurple/util.c	f0d44d62c931286cc6cb2be18c3e04b01cc42469
+++ libpurple/util.c	d2e5aaef8e9532ae97efc17dffbf045804b75a25
@@ -1352,7 +1352,9 @@ purple_markup_html_to_xhtml(const char *
 							g_string_append_printf(xhtml, "</%s>", pt->dest_tag);
 						if(plain && !strcmp(pt->src_tag, "a")) {
 							/* if this is a link, we have to add the url to the plaintext, too */
-							if (cdata && url && !g_string_equal(cdata, url))
+							if (cdata && url &&
+									(!g_string_equal(cdata, url) && (g_ascii_strncasecmp(url->str, "mailto:", 7) != 0 ||
+									                                 g_utf8_collate(url->str + 7, cdata->str) != 0)))
 								g_string_append_printf(plain, " <%s>", g_strstrip(url->str));
 							if (cdata) {
 								g_string_free(cdata, TRUE);
@@ -1712,6 +1714,8 @@ purple_markup_html_to_xhtml(const char *
 				xhtml = g_string_append_len(xhtml, c, len);
 			if(plain)
 				plain = g_string_append(plain, pln);
+			if(cdata)
+				cdata = g_string_append_len(cdata, c, len);
 			c += len;
 		} else {
 			if(xhtml)
@@ -1737,6 +1741,8 @@ purple_markup_html_to_xhtml(const char *
 		*plain_out = g_string_free(plain, FALSE);
 	if(url)
 		g_string_free(url, TRUE);
+	if (cdata)
+		g_string_free(cdata, TRUE);
 }
 
 /* The following are probably reasonable changes:


More information about the Commits mailing list