mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
#12220: improve minidom error when URI contains spaces.
Fix by 'amathew', test by Marek Stepniowski.
This commit is contained in:
parent
09ae544ea3
commit
9077d24d7f
4 changed files with 11 additions and 1 deletions
|
@ -121,10 +121,12 @@ def _parse_ns_name(builder, name):
|
|||
qname = "%s:%s" % (prefix, localname)
|
||||
qname = intern(qname, qname)
|
||||
localname = intern(localname, localname)
|
||||
else:
|
||||
elif len(parts) == 2:
|
||||
uri, localname = parts
|
||||
prefix = EMPTY_PREFIX
|
||||
qname = localname = intern(localname, localname)
|
||||
else:
|
||||
raise ValueError("Unsupported syntax: spaces in URIs not supported: %r" % name)
|
||||
return intern(uri, uri), localname, prefix, qname
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue