Skip to content

gh-152142: Fix inverted DOMBuilderFilter result for notation declarations#152143

Open
tonghuaroot wants to merge 1 commit into
python:mainfrom
tonghuaroot:fix-notation-decl-filter
Open

gh-152142: Fix inverted DOMBuilderFilter result for notation declarations#152143
tonghuaroot wants to merge 1 commit into
python:mainfrom
tonghuaroot:fix-notation-decl-filter

Conversation

@tonghuaroot

@tonghuaroot tonghuaroot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

notation_decl_handler deleted a notation when the DOMBuilderFilter accepted it and kept it when the filter rejected it, the inverse of entity_decl_handler and the other filtered handlers. Compare against FILTER_REJECT like the rest, and add a regression test.

Fixes #152142.

…clarations

xml.dom.expatbuilder.notation_decl_handler dropped a notation when the
DOMBuilderFilter accepted it and kept it when the filter rejected it, the
inverse of entity_decl_handler and the DOMBuilderFilter contract. Compare
against FILTER_REJECT like the other handlers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

xml.dom.minidom: DOMBuilderFilter accept/reject is inverted for notation declarations

1 participant