-
-
Notifications
You must be signed in to change notification settings - Fork 377
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
Closing tag is missing within <![CDATA #571
Comments
Hello @bytecode77 ,
FireFox:
Best Regards, Jon |
Thanks for your quick response Jonathan! For a comment, I think the end tag is not useful to the DOM. However, the code does not represent a comment:
Specifically, this code was retrieved by the Confluence API when reading Confluence pages. I'm not sure what the purpose of |
Indeed, you are right. I just assumed this, looking at the result, but that's not the case. I never had to really use the At this moment, it still looks like the current behavior looks more like the normal behavior unless I'm proving wrong. Again, I'm not familiar with this tag, so I could definitely be wrong. Best Regards, Jon |
This is the original HTML that is a Confluence page export that I'm parsing. It does contain a Yes, it was used within
|
Hello @bytecode77 , Thank you for the additional info. I have looked at the HAP code, and the I would not like to change the current default behavior, but I'm open to looking more at it to support it the way you want through an option that you will need to enable. I should be able to look more at it later this week Best Regards, Jon |
Thanks for looking into it, Jon! I'll stay tuned for your updates :) |
Hello @bytecode77 , A new version has been released today: https://github.com/zzzprojects/html-agility-pack/releases/tag/v1.11.68 Could you try the new option and let us know if everything is working as expected. Best Regards, Jon |
Hi Jonathan! thank's for providing a new version! However, unfortunately the result is the same as before, see the dotnetfiddle that I posted initially. To provide a more concrete example: When importing HTML from Confluence, this is what the HTML string looks like:
It's a code box showing some HTML. However, the
|
Hello @bytecode77 , Fiddle currently still uses the previous version of HAP and not the latest one (don't ask me why!). You need to turn on the following options to make it works: HtmlDocument document = new HtmlDocument();
document.OptionThreatCDataBlockAsComment = true; I tested both your examples (the first one and the one you just posted), and both seem to work very fine with this option. Best Regards, Jon |
Ah, I see. However, unfortunately the option |
Oh god my bad, It looks like I did a bad release! The v1.11.69 is now available. I double-checked to ensure I had not made the same mistake twice 😆 Best Regards, Jon |
Let me know if this version was working |
Works like a charm! Thanks for your support, Jonathan, and keep up the nice work. I really love HtmlAgilityPack and I've been using it for many years. Bye! |
@JonathanMagnan Regarding the spelling of |
You're right, wo80, didn't notice :D @JonathanMagnan I think if you change the typo and break upward compatibility, there is only one person (me) who would be affected, but that's no problem. When I update some time in the future I will just change the wording on the calling site, too. |
Do'h! You are 100% right @wo80
|
Hello, The v1.11.70 is now available with the option renamed as proposed by @wo80 ;) Best Regards, Jon |
1. Description
Closing tag is missing within
<![CDATA
object.Background: This issue surfaced when parsing HTML
<code>
blocks. The HTML content is given by Confluence, where the HTML is parsed from.3. Fiddle or Project
https://dotnetfiddle.net/XmcOB6
Expected Result
Actual Result
4. Any further technical details
The text was updated successfully, but these errors were encountered: