This seems like a bug - just want to make sure I understand what's happening - maybe others have seen this -
When parsing an HTML document that has a link element in the head that is closed like:
It seems the parser interprets this a just an opening tag for link - and then when you write out the HtmlDocument you get:
which of course changes the meaning of the original HTML document. Has anyone seen a similar problem?
My sample code:
doc = new HtmlAgilityPack.HtmlDocument();
StringWriter sw = new StringWriter();
newContents = sw.ToString();
newContents now has an HTML doc with unclosed link tag...