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

Reject unclosed DOCTYPE on parsing #153

Merged
merged 4 commits into from
Jun 19, 2024
Merged

Conversation

makenowjust
Copy link
Contributor

Fix #152

test/parse/test_document_type_declaration.rb Outdated Show resolved Hide resolved
if in_doctype
raise ParseException.new("Malformed DOCTYPE: unclosed",
@parser.source, @parser)
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do this in baseparser.rb instead of here?
If we can do it, other parsers such as StreamParser can detect this case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will try it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated!

@kou kou merged commit f704011 into ruby:master Jun 19, 2024
61 checks passed
@makenowjust makenowjust deleted the unclosed-doctype branch June 19, 2024 06:08
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.

BUG: REXML accepts unclosed DOCTYPE
2 participants