Skip to content

gh-156812: Check structural rules when serializing in xml.dom.minidom - #161830

Open
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:minidom-doctype-quoting
Open

serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:minidom-doctype-quoting

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

Only the structure is checked, not the characters.

A comment ending with - was fused with the closing --> into --->.

A processing instruction was not checked at all: ?> in the data silently closed it, and the reserved target xml produced a document which cannot be parsed.

The identifiers of the document type declaration were interpolated into single quotes without checks, so an identifier containing a quote or other illegal character produced XML which is not well-formed, and a public identifier without a system identifier produced the literal None.

…inidom

Only the structure is checked, not the characters.

A comment ending with '-' was fused with the closing '-->' into '--->'.
A processing instruction was not checked at all: '?>' in the data silently
closed it, and the reserved target 'xml' produced a document which cannot
be parsed.  The identifiers of the document type declaration were
interpolated into single quotes without checks, so an identifier containing
a quote or other illegal character produced XML which is not well-formed,
and a public identifier without a system identifier produced the literal
'None'.
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #35823570 | 📁 Comparing c4f9ac7 against main (a872024)

  🔍 Preview build  

2 files changed
± library/xml.dom.minidom.html
± whatsnew/changelog.html

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.

1 participant