[issue19832] XML version is ignored

2021-06-18 Thread Stefan Behnel
Stefan Behnel added the comment: After reading up a bit, version "X" should probably be rejected, whereas "1.[0-9]+" is meant to be allowed also by a 1.0 parser, according to the spec: https://www.w3.org/TR/REC-xml/#sec-prolog-dtd """ When an XML 1.0 processor encounters a document that

[issue19832] XML version is ignored

2021-06-18 Thread Irit Katriel
Irit Katriel added the comment: Reproduced in 3.11: >>> xml.sax.parseString(">> encoding='UTF-8'?>blah", xml.sax.ContentHandler()) >>> -- nosy: +iritkatriel versions: +Python 3.11 -Python 2.7 ___ Python tracker

[issue19832] XML version is ignored

2013-11-29 Thread Tobias Kuhn
New submission from Tobias Kuhn: The first line of an XML file should be something like this: ?xml version='1.0' encoding='UTF-8'? The XML parser of xml.sax, however, seems to ignore the value of version: ?xml version='X' encoding='UTF-8'? This should give an error, but it doesn't.

[issue19832] XML version is ignored

2013-11-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +christian.heimes, eli.bendersky, scoder ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19832 ___

[issue19832] XML version is ignored

2013-11-29 Thread Stefan Behnel
Stefan Behnel added the comment: If (as I assume) XML 1.1 isn't supported, then rejecting anything but 1.0 would be correct. Not for Py2.7 anymore, though, I guess, more something to fix for 3.4. -- ___ Python tracker rep...@bugs.python.org