# HG changeset patch # User Stu Tomlinson # Date 1176570472 0 # Node ID 8e61e7be988bdf2f019230d01cc38181edc88210 # Parent 6dab5732a4fd3c46117dde2ba090c8a56d793362 Stop Yahoo sending SPAN tags, fixes Yahoo part of ticket 78 diff -r 6dab5732a4fd -r 8e61e7be988b libpurple/protocols/yahoo/util.c --- a/libpurple/protocols/yahoo/util.c Sat Apr 14 16:37:08 2007 +0000 +++ b/libpurple/protocols/yahoo/util.c Sat Apr 14 17:07:52 2007 +0000 @@ -622,6 +622,18 @@ break; } } + } else if (!g_ascii_strncasecmp(&src[i+1], "SPAN", j - i - 1)) { /* drop span tags */ + while (1) { + if (++j >= len) { + g_string_append(dest, &src[i]); + i = len; + break; + } + if (src[j] == '>') { + i = j; + break; + } + } } else if (g_ascii_strncasecmp(&src[i+1], "FONT", j - i - 1)) { /* not interested! */ while (1) { if (++j >= len) { @@ -668,6 +680,8 @@ g_string_append_c(dest, '\n'); } else if (!g_ascii_strncasecmp(&src[i+1], "/BODY", sublen)) { /* mmm, tags. *BURP* */ + } else if (!g_ascii_strncasecmp(&src[i+1], "/SPAN", sublen)) { + /* tags. dangerously close to */ } else if (!g_ascii_strncasecmp(&src[i+1], "/FONT", sublen) && g_queue_peek_tail(tags)) { char *etag, *cl;