[gaim-migrate @ 9213]

Sun, 21 Mar 2004 18:24:29 +0000

author
Kevin Stange <kstange@pidgin.im>
date
Sun, 21 Mar 2004 18:24:29 +0000
changeset 8480
e1c32e741f2d
parent 8479
0d5e9525305b
child 8481
7a9eb76e8eee

[gaim-migrate @ 9213]
" This patch will fix yahoo sending <A> tags when it
auto-linkifies links. It converts the <A> tags into
proper markup for yahoo links in the manner that marv
had previously mentioned to me.

This will screw up if people try using the insert link
button on the toolbar. That button needs to be
disabled through a gaim prpl or connection flag for
yahoo, but I am not willing to decide how that should
be done." --Kevin Stange

committer: Luke Schierer <lschiere@pidgin.im>

src/protocols/yahoo/util.c file | annotate | diff | comparison | revisions
--- a/src/protocols/yahoo/util.c	Sun Mar 21 06:18:55 2004 +0000
+++ b/src/protocols/yahoo/util.c	Sun Mar 21 18:24:29 2004 +0000
@@ -592,6 +592,19 @@
 							i = t - src;
 							break;
 						}
+					} else if (!g_ascii_strncasecmp(&src[i+1], "A", j - i - 1)) {
+					    while (1) {
+						    if (++j >= len) {
+							    g_string_append(dest, &src[i]);
+								i = len;
+								break;
+							}
+							if (src[j] == '>') {
+							    g_string_append(dest, "\033[lm");
+							    i = j;
+								break;
+							}
+						}
 					} else if (g_ascii_strncasecmp(&src[i+1], "FONT", j - i - 1)) { /* not interested! */
 						while (1) {
 							if (++j >= len) {
@@ -632,6 +645,8 @@
 							g_string_append(dest, "\033[4m");
 						} else if (!g_ascii_strncasecmp(&src[i+1], "/U", sublen)) {
 							g_string_append(dest, "\033[x4m");
+						} else if (!g_ascii_strncasecmp(&src[i+1], "/A", sublen)) {
+							g_string_append(dest, "\033[xlm");
 						} else if (!g_ascii_strncasecmp(&src[i+1], "BR", sublen)) {
 							g_string_append_c(dest, '\n');
 						} else if (!g_ascii_strncasecmp(&src[i+1], "/BODY", sublen)) {

mercurial