Mercurial > pidgin
changeset 16109:8e61e7be988b
Stop Yahoo sending SPAN tags, fixes Yahoo part of ticket 78
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sat, 14 Apr 2007 17:07:52 +0000 |
parents | 6dab5732a4fd |
children | 0a5470a8fd24 |
files | libpurple/protocols/yahoo/util.c |
diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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, </body> tags. *BURP* */ + } else if (!g_ascii_strncasecmp(&src[i+1], "/SPAN", sublen)) { + /* </span> tags. dangerously close to </spam> */ } else if (!g_ascii_strncasecmp(&src[i+1], "/FONT", sublen) && g_queue_peek_tail(tags)) { char *etag, *cl;