The html rendering result is different from the html output result when tbody is added inside unclosed th #530
Closed
Description
When we have a tbody
tag inside a unclosed th
then the output is different from the way chrome renders it.
While closes the entire thead
, HAP adds the tbody
tag inside the th
.
HTML: <table><thead><tr><th></th><th></th><th><tbody></table>
HAP Result: <table><thead><tr><th></th><th></th><th><tbody></tbody></th></tr></thead></table>
Chrome Result: <table><thead><tr><th></th><th></th><th></th></tr></thead><tbody></tbody></table>
This is the test I used:
var html = @"<table><thead><tr><th></th><th></th><th><tbody></table>";
var doc = new HtmlDocument();
doc.LoadHtml(html);
var newHtml = doc.DocumentNode.OuterHtml; //<table><thead><tr><th></th><th></th><th><tbody></tbody></th></tr></thead></table>
var res = @"<table><thead><tr><th></th><th></th><th></th></tr></thead><tbody></tbody></table>"; //chrome or edge rendering results
var b = newHtml == res; //false
Metadata
Assignees
Labels
No labels