diff -r ac99c78fa9d5 -r fd35a0b71e46 src/gtkhtml.c
--- 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);