Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
05a19a50
Commit
05a19a50
authored
Feb 23, 2008
by
Andrew M. Kuchling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#1433694: minidom's .normalize() failed to set .nextSibling for last element.
Fix by Malte Helmert
parent
be0adfcf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
0 deletions
+15
-0
Lib/test/test_minidom.py
Lib/test/test_minidom.py
+8
-0
Lib/xml/dom/minidom.py
Lib/xml/dom/minidom.py
+2
-0
Misc/ACKS
Misc/ACKS
+1
-0
Misc/NEWS
Misc/NEWS
+4
-0
No files found.
Lib/test/test_minidom.py
View file @
05a19a50
...
...
@@ -806,6 +806,14 @@ def testNormalize():
"testNormalize -- single empty node removed"
)
doc
.
unlink
()
def
testBug1433694
():
doc
=
parseString
(
"<o><i/>t</o>"
)
node
=
doc
.
documentElement
node
.
childNodes
[
1
].
nodeValue
=
""
node
.
normalize
()
confirm
(
node
.
childNodes
[
-
1
].
nextSibling
==
None
,
"Final child's .nextSibling should be None"
)
def
testSiblings
():
doc
=
parseString
(
"<doc><?pi?>text?<elm/></doc>"
)
root
=
doc
.
documentElement
...
...
Lib/xml/dom/minidom.py
View file @
05a19a50
...
...
@@ -203,6 +203,8 @@ class Node(xml.dom.Node):
L
.
append
(
child
)
if
child
.
nodeType
==
Node
.
ELEMENT_NODE
:
child
.
normalize
()
if
L
:
L
[
-
1
].
nextSibling
=
None
self
.
childNodes
[:]
=
L
def
cloneNode
(
self
,
deep
):
...
...
Misc/ACKS
View file @
05a19a50
...
...
@@ -266,6 +266,7 @@ Shane Hathaway
Rycharde Hawkes
Jochen Hayek
Thomas Heller
Malte Helmert
Lance Finn Helsten
Jonathan Hendry
James Henstridge
...
...
Misc/NEWS
View file @
05a19a50
...
...
@@ -15,6 +15,10 @@ Core and builtins
Library
-------
- Bug #1433694: minidom'
s
.
normalize
()
failed
to
set
.
nextSibling
for
last
child
element
.
Extension
Modules
-----------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment