Skip to content
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

fix: don't throw on comment in dtd #267

Merged
merged 1 commit into from
May 27, 2024
Merged

fix: don't throw on comment in dtd #267

merged 1 commit into from
May 27, 2024

Conversation

SethFalco
Copy link
Contributor

@SethFalco SethFalco commented Jan 6, 2024

Makes the minimum change to allow comments in Doctype declarations, without adding additional support for parsing Doctype entities.

As sax was not checking for comments before, it would interpret ' or ] as XML and falsely treat them as real quotes or closing tags despite residing in an XML comment.

I don't think compatibility is a major concern for this PR, as the previous behavior was to throw an exception, so XML files that were affected by this weren't supported to begin with.

Regression Tests

I ran the regression test script from #266 on this PR, and can confirm it passes. 👍🏽

Related

@isaacs isaacs merged commit 8e8fa71 into isaacs:main May 27, 2024
2 of 16 checks passed
@SethFalco SethFalco deleted the fix-235 branch May 27, 2024 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

closing square bracket in a doctype comment leads to an error
2 participants