mirror of
https://github.com/python/cpython.git
synced 2025-09-01 14:38:00 +00:00
Fix (sanctioned by Sjoerd) for a problem reported by Andreas Faerber:
all processing instruction target names containing 'xml' were rejected, instead (as the standard rejects) only the name 'xml' itself (or case variants thereof).
This commit is contained in:
parent
5116f90ece
commit
1f2e09bc45
1 changed files with 1 additions and 1 deletions
|
@ -495,7 +495,7 @@ class XMLParser:
|
||||||
self.syntax_error('xml:namespace prefix not unique')
|
self.syntax_error('xml:namespace prefix not unique')
|
||||||
self.__namespaces[prefix] = attrdict['ns']
|
self.__namespaces[prefix] = attrdict['ns']
|
||||||
else:
|
else:
|
||||||
if string.find(string.lower(name), 'xml') >= 0:
|
if string.lower(name) == 'xml':
|
||||||
self.syntax_error('illegal processing instruction target name')
|
self.syntax_error('illegal processing instruction target name')
|
||||||
self.handle_proc(name, rawdata[k:j])
|
self.handle_proc(name, rawdata[k:j])
|
||||||
return end.end(0)
|
return end.end(0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue