W3C home > Mailing lists > Public > html-tidy@w3.org > April to June 2000

Code errors in lexer.c and parser.c

From: Gary Deschaines <gary.deschaines@netmechanic.com>
Date: Wed, 24 May 2000 17:08:12 -0400 (EDT)
Message-ID: <392C4247.9BAF5781@netmechanic.com>
To: html-tidy@w3.org
Dave,

I believe the following code segments in the 30 April 2000 versions of
lexer.c and parser.c contain errors.

diff lexer.c_orig lexer.c
1816,1817c1816,1819
<                         if (!MakeClean && (lexer->token->tag ==
tag_nobr ||
<                                                 lexer->token->tag ==
tag_wbr))
---
>                         if (MakeClean && (lexer->token->tag !=
tag_nobr &&
>                                                 lexer->token->tag !=
tag_wbr))
>                             ReportWarning(lexer, null, lexer->token,
PROPRIETARY_ELEMENT);
>                         else

The above change allows warning reports on proprietary elements other
than NOBR and WBR when MakeClean is enabled (since MakeClean replaces
these two tags) and warning reports on any proprietary elements when
MakeClean is disabled.

diff parser.c_orig parser.c
2081c2081
<                 if (!node->type == TextNode)
---
>                 if (node->type != TextNode)

The above code change allows BLOCK and INLINE nodes inserted before a
TABLE element
to be parsed.

Respectfully,
Gary Deschaines
gary.deschaines@netmechanic.com
Received on Tuesday, 30 May 2000 14:41:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:43 GMT