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
19aff0c9
Commit
19aff0c9
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
8887e548
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
0 deletions
+11
-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
No files found.
Lib/test/test_minidom.py
View file @
19aff0c9
...
...
@@ -791,6 +791,14 @@ class MinidomTest(unittest.TestCase):
"testNormalize -- single empty node removed"
)
doc
.
unlink
()
def
testBug1433694
(
self
):
doc
=
parseString
(
"<o><i/>t</o>"
)
node
=
doc
.
documentElement
node
.
childNodes
[
1
].
nodeValue
=
""
node
.
normalize
()
self
.
confirm
(
node
.
childNodes
[
-
1
].
nextSibling
==
None
,
"Final child's .nextSibling should be None"
)
def
testSiblings
(
self
):
doc
=
parseString
(
"<doc><?pi?>text?<elm/></doc>"
)
root
=
doc
.
documentElement
...
...
Lib/xml/dom/minidom.py
View file @
19aff0c9
...
...
@@ -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 @
19aff0c9
...
...
@@ -274,6 +274,7 @@ Shane Hathaway
Rycharde Hawkes
Jochen Hayek
Thomas Heller
Malte Helmert
Lance Finn Helsten
Jonathan Hendry
James Henstridge
...
...
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