Mercurial > pidgin
diff src/gtkhtml.c @ 643:df1ceace5cac
[gaim-migrate @ 653]
this should take care of hideous backgrounds in toc's user info
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Tue, 08 Aug 2000 22:47:47 +0000 |
parents | 8f0ba638d819 |
children | 71ea550c22ac |
line wrap: on
line diff
--- a/src/gtkhtml.c Tue Aug 08 21:08:56 2000 +0000 +++ b/src/gtkhtml.c Tue Aug 08 22:47:47 2000 +0000 @@ -3421,12 +3421,19 @@ (tag, "BODY BGCOLOR", strlen("BODY BGCOLOR"))) { + char *d = tag; /* * Ditch trailing \" */ current = push_state(current); - tag[strlen(tag) - 1] = 0; - if (sscanf(tag + strlen("BODY BGCOLOR=\"#"), "%x", &colorv) + d += strlen("BODY BGCOLOR="); + if (*d == '\"') + d++; + if (*d == '#') + d++; + if (d[strlen(d) - 1] == '\"') + d[strlen(d) - 1] = 0; + if (sscanf(d, "%x", &colorv) && !(options & HTML_OPTION_NO_COLOURS)) { current->bgcol = get_color(colorv, map);