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
9077d24d
Commit
9077d24d
authored
Apr 20, 2014
by
R David Murray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#12220: improve minidom error when URI contains spaces.
Fix by 'amathew', test by Marek Stepniowski.
parent
09ae544e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
1 deletion
+11
-1
Lib/test/test_minidom.py
Lib/test/test_minidom.py
+4
-0
Lib/xml/dom/expatbuilder.py
Lib/xml/dom/expatbuilder.py
+3
-1
Misc/ACKS
Misc/ACKS
+1
-0
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_minidom.py
View file @
9077d24d
...
@@ -1518,6 +1518,10 @@ class MinidomTest(unittest.TestCase):
...
@@ -1518,6 +1518,10 @@ class MinidomTest(unittest.TestCase):
doc2
=
parseString
(
doc
.
toxml
())
doc2
=
parseString
(
doc
.
toxml
())
self
.
confirm
(
doc2
.
namespaceURI
==
xml
.
dom
.
EMPTY_NAMESPACE
)
self
.
confirm
(
doc2
.
namespaceURI
==
xml
.
dom
.
EMPTY_NAMESPACE
)
def
testExceptionOnSpacesInXMLNSValue
(
self
):
with
self
.
assertRaisesRegex
(
ValueError
,
'Unsupported syntax'
):
parseString
(
'<element xmlns:abc="http:abc.com/de f g/hi/j k"><abc:foo /></element>'
)
def
testDocRemoveChild
(
self
):
def
testDocRemoveChild
(
self
):
doc
=
parse
(
tstfile
)
doc
=
parse
(
tstfile
)
title_tag
=
doc
.
documentElement
.
getElementsByTagName
(
"TITLE"
)[
0
]
title_tag
=
doc
.
documentElement
.
getElementsByTagName
(
"TITLE"
)[
0
]
...
...
Lib/xml/dom/expatbuilder.py
View file @
9077d24d
...
@@ -121,10 +121,12 @@ def _parse_ns_name(builder, name):
...
@@ -121,10 +121,12 @@ def _parse_ns_name(builder, name):
qname
=
"%s:%s"
%
(
prefix
,
localname
)
qname
=
"%s:%s"
%
(
prefix
,
localname
)
qname
=
intern
(
qname
,
qname
)
qname
=
intern
(
qname
,
qname
)
localname
=
intern
(
localname
,
localname
)
localname
=
intern
(
localname
,
localname
)
el
se
:
el
if
len
(
parts
)
==
2
:
uri
,
localname
=
parts
uri
,
localname
=
parts
prefix
=
EMPTY_PREFIX
prefix
=
EMPTY_PREFIX
qname
=
localname
=
intern
(
localname
,
localname
)
qname
=
localname
=
intern
(
localname
,
localname
)
else
:
raise
ValueError
(
"Unsupported syntax: spaces in URIs not supported: %r"
%
name
)
return
intern
(
uri
,
uri
),
localname
,
prefix
,
qname
return
intern
(
uri
,
uri
),
localname
,
prefix
,
qname
...
...
Misc/ACKS
View file @
9077d24d
...
@@ -1255,6 +1255,7 @@ Joel Stanley
...
@@ -1255,6 +1255,7 @@ Joel Stanley
Anthony Starks
Anthony Starks
Oliver Steele
Oliver Steele
Greg Stein
Greg Stein
Marek Stepniowski
Baruch Sterin
Baruch Sterin
Chris Stern
Chris Stern
Alex Stewart
Alex Stewart
...
...
Misc/NEWS
View file @
9077d24d
...
@@ -39,6 +39,9 @@ Core and Builtins
...
@@ -39,6 +39,9 @@ Core and Builtins
Library
Library
-------
-------
- Issue #12220: mindom now raises a custom ValueError indicating it doesn'
t
support
spaces
in
URIs
instead
of
letting
a
'split'
ValueError
bubble
up
.
-
Issue
#
21239
:
patch
.
stopall
()
didn
't work deterministically when the same
-
Issue
#
21239
:
patch
.
stopall
()
didn
't work deterministically when the same
name was patched more than once.
name was patched more than once.
...
...
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