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:
Guido van Rossum 1999-06-08 21:23:26 +00:00
parent 5116f90ece
commit 1f2e09bc45
1 changed files with 1 additions and 1 deletions

View File

@ -495,7 +495,7 @@ class XMLParser:
self.syntax_error('xml:namespace prefix not unique')
self.__namespaces[prefix] = attrdict['ns']
else:
if string.find(string.lower(name), 'xml') >= 0:
if string.lower(name) == 'xml':
self.syntax_error('illegal processing instruction target name')
self.handle_proc(name, rawdata[k:j])
return end.end(0)