Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1f2e09b

Browse files
committed
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).
1 parent 5116f90 commit 1f2e09b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/xmllib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ def parse_proc(self, i):
495495
self.syntax_error('xml:namespace prefix not unique')
496496
self.__namespaces[prefix] = attrdict['ns']
497497
else:
498-
if string.find(string.lower(name), 'xml') >= 0:
498+
if string.lower(name) == 'xml':
499499
self.syntax_error('illegal processing instruction target name')
500500
self.handle_proc(name, rawdata[k:j])
501501
return end.end(0)

0 commit comments

Comments
 (0)