-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
gh-50002: xml.dom.minidom now preserves whitespaces in attributes #107947
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
Changes from 1 commit
dd6c84c
6dd15a4
b926f36
dc72044
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -300,12 +300,27 @@ def _in_document(node): | |||||||
| node = node.parentNode | ||||||||
| return False | ||||||||
|
|
||||||||
| def _write_data(writer, data): | ||||||||
| def _write_data(writer, text, attr): | ||||||||
scoder marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||
| "Writes datachars to writer." | ||||||||
| if data: | ||||||||
| data = data.replace("&", "&").replace("<", "<"). \ | ||||||||
| replace("\"", """).replace(">", ">") | ||||||||
| writer.write(data) | ||||||||
| if text: | ||||||||
|
||||||||
| if text: | |
| if not text: | |
| return |
rather than adding indentation to long chunks of code that only makes readers look down to see if something joined is still done at the end. Better make it clear right away that we're done handling this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. I just kept the style of the old code.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| :mod:`xml.dom.minidom` now preserves whitespaces in attributes. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| :mod:`xml.dom.minidom` now only quotes ``"`` in attributes. |
Uh oh!
There was an error while loading. Please reload this page.