-
-
Notifications
You must be signed in to change notification settings - Fork 376
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
InnerStartIndex value is wrong in nested elements when sequence is escaped. #508
Comments
Well, it's entirely unclear what Note that the documentation comments for HtmlNode.InnerStartIndex and HtmlNode.OuterStartIndex html-agility-pack/src/HtmlAgilityPack.Shared/HtmlNode.cs Lines 561 to 564 in 2e98e14
and html-agility-pack/src/HtmlAgilityPack.Shared/HtmlNode.cs Lines 569 to 572 in 2e98e14
say "Gets the stream position". What does that precisely mean? The wording, especially "stream" is not really aligning well with "parsed HTML document" but rather the source of the parsed HTML document. Then again, no streams involved here in your example -- the source itself being a string -- but look at the HtmlDocument.LoadHtml(string) implementation, and you notice a StringReader being created for the source string, which gives me the impression "stream" here in this context is meant to be "source"... But it gets more complicated and a bit messy. Note the public
And then there is also the html-agility-pack/src/HtmlAgilityPack.Shared/HtmlDocument.cs Lines 263 to 268 in 2e98e14
which claims to provide the parsed text, but in reality is just a proxy property for HtmlDocument.Text which seems to provide the un-parsed source text. No idea what's up with the HtmlDocument.Text field and the HtmlDocument.ParsedText property and how it is supposed to be, but something isn't right with these two.. |
1. Description
InnerStartIndex
value is wrong in nested elements when sequence is escaped.3. Fiddle or Project
Provide a Fiddle that reproduce the issue: https://dotnetfiddle.net/zi7dBK
If you change line 14 to this:
It works.
4. Any further technical details
The text was updated successfully, but these errors were encountered: