summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-06-08 21:23:26 (GMT)
committerGuido van Rossum <guido@python.org>1999-06-08 21:23:26 (GMT)
commit1f2e09bc45faa25c95f4e4ea1b24201af916179c (patch)
tree28905a91fd2b50def24c0731689803b8e1af8beb
parent5116f90ece5586cdca04e91cf0b1bb566bcc258d (diff)
downloadcpython-1f2e09bc45faa25c95f4e4ea1b24201af916179c.zip
cpython-1f2e09bc45faa25c95f4e4ea1b24201af916179c.tar.gz
cpython-1f2e09bc45faa25c95f4e4ea1b24201af916179c.tar.bz2
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).
-rw-r--r--Lib/xmllib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/xmllib.py b/Lib/xmllib.py
index 0891158..c74f71e 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)