im.pidgin.pidgin.2.2.3: 06acb4de84d97aa7032f480173a4e6e4c0c487d5

rekkanoryo at pidgin.im rekkanoryo at pidgin.im
Fri Nov 9 13:26:49 EST 2007


-----------------------------------------------------------------
Revision: 06acb4de84d97aa7032f480173a4e6e4c0c487d5
Ancestor: 35395fae3450a078825614e4369ef236cf82b239
Author: rekkanoryo at pidgin.im
Date: 2007-11-09T18:06:54
Branch: im.pidgin.pidgin.2.2.3

Modified files:
        libpurple/util.c

ChangeLog: 

applied changes from 75816a5c9fd2a269fff7d9de414833088ef32cda
             through bd554241acb7ec65bf15c42bef90dc7e10b9689f

-------------- next part --------------
============================================================
--- libpurple/util.c	d04d8ad505be519328226aa5165d944cb91fdfae
+++ libpurple/util.c	8e388ccabd2215bcb20d1c80d66de3f3769d1009
@@ -1369,7 +1369,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);
@@ -1729,6 +1731,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)
@@ -1754,6 +1758,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