Re: tidy fails on comment in <tbody>

On Sat, 31 Jul 1999, Terry Teague wrote:

> At 1:11 PM -0700 7/30/99, John Cumming wrote:
> >This turned up on Solaris 2, with tidy built using gcc.
> >
> >The parser has trouble with a comment between a "<tbody>"
> >and a "<tr>", and likewise with a comment between "</tr>"
> >and "<tr>" within a TBODY. It causes a Segmentation Fault
> >when tidy_out() tries to print a DISCARDING_UNEXPECTED
> >message with a string whose address is 0.

This is an oversight on my behalf. The fix is to add the following
into ParseRowGroup in parser.c at line 1481 just before the code for
discarding unknown tags:

        /* deal with comments */
        if (node->type == CommentTag ||
            node->type == ProcInsTag ||
            node->type == AspTag)
        {
            InsertNode(rowgroup, node);
            continue;
        }


Regards,

-- Dave Raggett <dsr@w3.org> http://www.w3.org/People/Raggett
phone: +44 122 578 2984 (or 2521) +44 385 320 444 (gsm mobile)
World Wide Web Consortium (on assignment from HP Labs)

Received on Sunday, 15 August 1999 08:49:44 UTC