Re: tidy fails on comment in <tbody>

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.
>
>  Tidy (vers 26th July 1999) Parsing "../fault2.html"
>  line 10 column 1 - Warning: discarding unexpected
>
>
>-------- Example HTML document --------
><html>
><head>
><title>Comment in `tbody' before a `tr' causes Segmentation Fault</title>
></head>
>
><body>
><table summary="example">
>  <tbody>
>  <!-- comment -->
>  <tr>
>    <td>xxx</td>
>  </tr>
>  </tbody>
></table>
></body>
></html>
>
>---------------------------------------

Just as a FYI, it is not crashing on the Mac OS version.

Here is the error output I am getting from the test case above (using the
26th July 99 sources ) :

Tidy (vers 26th July 1999) Parsing "comment in <tbody>.html"
line 9 column 3 - Warning: discarding unexpected

"comment in <tbody>.html" appears to be HTML 4.0
1 warnings/errors were found!

Here is the cleaned output :

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<title>Comment in `tbody' before a `tr' causes Segmentation
Fault</title>
</head>
<body>
<table summary="example">
<tbody>
<tr>
<td>xxx</td>
</tr>
</tbody>
</table>
</body>
</html>


Regards, Terry

Received on Saturday, 31 July 1999 23:24:31 UTC