Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse problem: closed void tag with XHTML #202

Open
Risord opened this issue Oct 14, 2015 · 1 comment
Open

Parse problem: closed void tag with XHTML #202

Risord opened this issue Oct 14, 2015 · 1 comment

Comments

@Risord
Copy link

Risord commented Oct 14, 2015

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
Copy link
Author

Risord commented Oct 14, 2015

Edit: Fixed markdown presentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant