From: Guido van Rossum Date: Tue, 8 Jun 1999 21:23:26 +0000 (+0000) Subject: Fix (sanctioned by Sjoerd) for a problem reported by Andreas Faerber: X-Git-Tag: v1.6a1~1270 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1f2e09bc45faa25c95f4e4ea1b24201af916179c;p=thirdparty%2FPython%2Fcpython.git 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). --- diff --git a/Lib/xmllib.py b/Lib/xmllib.py index 089115848f07..c74f71e963bf 100644 --- a/Lib/xmllib.py +++ b/Lib/xmllib.py @@ -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)