Skip to content

Conversation

@otuncelli
Copy link
Contributor

The current implementation includes the following check:

if (text.Length <= 4)
    return false;

This condition inadvertently excludes valid minimal closing tags like or , which have a length of exactly 4 characters. To accurately assess such tags, the condition should be adjusted to:

if (text.Length < 4)
    return false;

This change ensures that tags with a length of 4 are properly evaluated.

HtmlNode.IsOverlappedClosingElement("</b>"); // Returns false, but should return true

@JonathanMagnan JonathanMagnan self-assigned this Jul 20, 2025
@JonathanMagnan JonathanMagnan merged commit 5e2f709 into zzzprojects:master Jul 20, 2025
@JonathanMagnan
Copy link
Member

Hello @otuncelli ,

Sorry for the delay and thank you for your PR,

It will be part of the next release that should happen this week.

Best Regards,

Jon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants