W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 1999

Re: tidy fails on comment in <tbody>

From: Dave Raggett <dsr@w3.org>
Date: Sun, 15 Aug 1999 13:52:41 +0100 (GMT Daylight Time)
To: Terry Teague <teague@mailandnews.com>
cc: html-tidy@w3.org
Message-ID: <Pine.WNT.4.10.9908151350480.-308917@hazel.hpl.hp.com>
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 GMT

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