CsQuery icon indicating copy to clipboard operation
CsQuery copied to clipboard

Parse problem: closed void tag with XHTML

Open Risord opened this issue 9 years ago • 1 comments

var html = "<div><br></br></div>";
var cs = new CsQuery.CQ(html, CsQuery.HtmlParsingMode.Fragment, CsQuery.HtmlParsingOptions.AllowSelfClosingTags, CsQuery.DocType.XHTML);
cs.Render();

Expected result:

<div><br></div>

Result:

<div><br><br></div>

This should be valid representation of br tag in XHTML, source: https://validator.w3.org

<br></br>

Risord avatar Oct 14 '15 07:10 Risord

Edit: Fixed markdown presentation

Risord avatar Oct 14 '15 07:10 Risord