HtmlAgilityPack LoadHtml - Issue with empty P tags

Viewed 698

I am trying to load simple html:

var html = "<div>something<p></p></div>";

var doc = new HtmlDocument();
doc.LoadHtml(html);

After loading this HTML doc.InnerHtml outputs this:

<div>something<p></div>

So as you can see it loses closing P tag and I got messed HTML.

I cannot find any solution for this, can anyone help me please.

1 Answers
Related