bug in handling </p> inside <table>

I have the following html:

<html>
<body>
<table>
<tr><td></td></tr>
<p>
</p>
<tr><td></td></tr>
</table>
</body>
</html>

When this html is parsed by the latest JTidy (released in July 2000), I get
the following warnings:

Tidy (vers 8th July 2000) Parsing "InputStream"
line 2 column 1 - Warning: inserting missing 'title' element
line 3 column 1 - Warning: <table> lacks "summary" attribute
line 5 column 1 - Warning: <p> isn't allowed in <table> elements
line 6 column 1 - Warning: </p> isn't allowed in <table> elements
line 6 column 1 - Warning: replacing element</p> by <br>
line 6 column 1 - Warning: inserting implicit <br>
line 7 column 2 - Warning: <tr> isn't allowed in <body> elements
line 7 column 2 - Warning: inserting implicit <table>
"InputStream" appears to be HTML 3.2
8 warnings/errors were found!

Here is the resulting html:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org">
<title></title>
</head>
<body>
<p></p>

<table>
<tr>
<td></td>
</tr>
</table>

<br>
<br>
 

<table>
<tr>
<td></td>
</tr>
</table>
</body>
</html>

The <p> and </p> tags on lines 5 and 6 (of the original html) are replaced
with two <br> tags. Also, a <table> tag was inserted. The first change is
OK, but the second one causes problems. The <table> tag should not be
inserted. Please fix this.

Received on Monday, 24 July 2000 12:50:30 UTC