From 1f2e09bc45faa25c95f4e4ea1b24201af916179c Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 8 Jun 1999 21:23:26 +0000 Subject: [PATCH] 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). --- Lib/xmllib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/xmllib.py b/Lib/xmllib.py index 089115848f..c74f71e963 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) -- 2.49.0