Skip to content

Tidy Incorrectly discards TABLE start tag when in TABLE #498

@ehlertjd

Description

@ehlertjd

Given the example html:

<table>
<table bgcolor=beige>
<tbody>
  <tr>
    <td>TEST</td>
  </tr>
</tbody>
</table>

Tidy produces the following:

<!DOCTYPE html>
<html>
<head>
<meta name="generator" content=
"HTML Tidy for HTML5 for Mac OS X version 5.2.0">
<title></title>
</head>
<body>
<table>
<tbody>
<tr>
<td>TEST</td>
</tr>
</tbody>
</table>
</body>
</html>

According to the HTML5 spec and this fiddle the parser should close the first table element, then re-process the second table element.

Expected result:

<!DOCTYPE html>
<html>
<head>
<meta name="generator" content=
"HTML Tidy for HTML5 for Mac OS X version 5.2.0">
<title></title>
</head>
<body>
<table>
</table>
<table bgcolor="beige">
<tbody>
<tr>
<td>TEST</td>
</tr>
</tbody>
</table>
</body>
</html>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions