FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-156665: Validate namespaces in xml.dom.minidom by serhiy-storchaka · Pull Request #156666 · python/cpython · GitHub

Repository navigation

gh-156665: Validate namespaces in xml.dom.minidom - #156666

Merged
serhiy-storchaka merged 2 commits into
python:mainfrom
serhiy-storchaka:gh-156665-namespace-validation
Sep 13, 2026
Merged

serhiy-storchaka merged 2 commits into
python:mainfrom
serhiy-storchaka:gh-156665-namespace-validation

Conversation

serhiy-storchaka commented Aug 30, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

NamespaceErr is now raised by createElementNS(), createAttributeNS(), setAttributeNS() and when setting the prefix of an attribute.

Two existing tests created xmlns:python attributes with "http://www.w3.org" as the namespace URI instead of the XMLNS namespace, and are fixed here.

createElementNS(), createAttributeNS() and setAttributeNS() now raise
NamespaceErr for a malformed qualified name, for a prefix with an empty
namespace, and for illegal use of the "xml" and "xmlns" prefixes, as required
by DOM Level 2 Core.  Setting the prefix of an attribute is validated too.

Two tests used a wrong namespace URI for xmlns attributes.

read-the-docs-community Bot commented Aug 30, 2026 •
edited
Loading

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34535512 | 📁 Comparing 19e0f0e against main (26d9b25)

  🔍 Preview build  

60 files changed · + 1 added · ± 58 modified · - 1 deleted

+ Added

± Modified

- Deleted

serhiy-storchaka merged commit ad447fa into python:main Sep 13, 2026
54 checks passed
serhiy-storchaka deleted the gh-156665-namespace-validation branch September 13, 2026 16:43
johnslavik pushed a commit to johnslavik/cpython that referenced this pull request Sep 14, 2026
)

createElementNS(), createAttributeNS() and setAttributeNS() now raise
NamespaceErr for a malformed qualified name, for a prefix with an empty
namespace, and for illegal use of the "xml" and "xmlns" prefixes, as required
by DOM Level 2 Core.  Setting the prefix of an attribute is validated too.

Two tests used a wrong namespace URI for xmlns attributes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

1 participant


Back | FazBrowse Home | New Git URL