html-agility-pack icon indicating copy to clipboard operation
html-agility-pack copied to clipboard

Inconsistency between `node.OuterHtml`, `node.EndNode.OuterHtml`, and `node.Closed`

Open rvishruth opened this issue 8 months ago • 6 comments

1. Description

Inconsistency between node.OuterHtml, node.EndNode.OuterHtml, and node.Closed

HtmlAgilityPack automatically closes certain nodes. However, when it does, the EndNode does not get updated accordingly.

Related follow-up questions:

  1. Is it possible to disable this auto-closing behavior?
  2. If not, how can one detect if any changes were made to the original HTML?
  3. Why are there no ParseErrors being logged?

2. Exception

N/A

3. Fiddle or Project

https://dotnetfiddle.net/wDNJfT

From output, p, <p>Hello, , <>, True - Endnode is <> and the <p> tag is not closed strong, <strong>world!</strong>, <>, True - EndNode is <> even though the OuterHTML has a closing tag

rvishruth avatar Jun 17 '24 23:06 rvishruth