Rendering HTML Tables with nested lists parses incorrectly
See original GitHub issueHi there!
I have come upon a use case where we need to render tables, with lists nested within them. I have tested on prior versions of the component (v6.4.1) and the issue is not present. It seems to have started since 6.5.0.
This is an example using 6.4.1
- https://stackblitz.com/edit/react-qugqd6
This is an example using 6.6.1
- https://stackblitz.com/edit/react-6nelfr
You’ll notice when using 6.6.1, it renders trailing </li>
tags for some reason.
This is the HTML i’m using
<table border="1">
<tr>
<td>a</td>
<td>b</td>
<td>c</td>
</tr>
<tr>
<td>left</td>
<td>
<p>Start of table</p>
<ul>
<li>List 1</li>
<li>
<ul>
<li>Nested List 1</li>
</ul>
</li>
<li>
<ul>
<li>list 2</li>
</ul>
</li>
</ul>
</td>
<td>right</td>
</tr>
</table>
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Using nested lists instead of tables for displaying data in HTML
Instead of using HTML tables, I'm thinking of just using nested list structures to display table-like data going forward. For example: <div class= ......
Read more >Improve HTML parsing for emails containing nested tables - Jira
Problem Definition. Emails containing HTML tables that are nested (smaller tables within main table) nested. For example will not be parsed correctly in...
Read more >Table Techniques to Avoid | Web Accessibility
Nested (embedded) tables should never be used. Covered in this Tutorial: Introduction; Poor Table Structures. Multiple Headings on a Row or Column; Multi-Cell...
Read more ><table>: The Table element - HTML - MDN Web Docs - Mozilla
The HTML element represents tabular data — that is, information presented in a two-dimensional table comprised of rows and columns of cells ...
Read more >Fix Your Site With the Right DOCTYPE! - A List Apart
Per HTML and XHTML standards, a DOCTYPE (short for “document type ... browser will attempt to parse your page in backward–compatible fashion, rendering...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Released as 6.6.2
I’ll take another look this weekend.