tidy fails on comment in <tbody>

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>

---------------------------------------

Thanks for the useful tool.

John

Received on Friday, 30 July 1999 16:11:45 UTC