]> granicus.if.org Git - python/commitdiff
Fix (sanctioned by Sjoerd) for a problem reported by Andreas Faerber:
authorGuido van Rossum <guido@python.org>
Tue, 8 Jun 1999 21:23:26 +0000 (21:23 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 8 Jun 1999 21:23:26 +0000 (21:23 +0000)
all processing instruction target names containing 'xml' were
rejected, instead (as the standard rejects) only the name 'xml' itself
(or case variants thereof).

Lib/xmllib.py

index 089115848f07a5e8e8f842c9f79f6884cc6f9cd4..c74f71e963bf5739141b72115ac17e2be781a556 100644 (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)