changeset 8480:b0cebd011cc0

[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: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sun, 21 Mar 2004 18:24:29 +0000
parents dc07d60d1183
children 6d0869404696
files src/protocols/yahoo/util.c
diffstat 1 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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)) {