I’m creating HtmlDocument and using LoadHtml(string). My input html string sometimes contains symbols < and > in it. So html parses incorrectly, for example:
My html is
<p>Value < 20 A B C</p>
And my document OutputHtml in this case is
<p>Value < 20="" a="" b=""></p>
Maybe there are some flags I have to set in HtmlDocument, but I didn’t find anything helpful.
P.S. HtmlNode has the same behaviour.
The best way to solve the problem is to change the caharacter
<in<(There is no need to change the character>)To know when the the character
<is of tag, and when it ‘smaller than’ you can ask withifHere the code:
I’m using it, and it is working perfect