New submission from Kees Bos:
ElementTree.fromstring and cElementTree.fromstring fail on parsing
value]]/value, but do parse value]]gt;/value
$ python
Python 2.7.3 (default, Apr 10 2013, 05:09:49)
[GCC 4.7.2] on linux2
Type help, copyright, credits or license for more information.
from
R. David Murray added the comment:
Why do you think this is a bug? (You may well be right; I'm not familiar with
the intricacies of XML. But on its face the behavior looks reasonable.)
--
nosy: +r.david.murray
___
Python tracker
Kees Bos added the comment:
I'm not an expert, but from: http://www.w3.org/TR/REC-xml/#NT-AttValue
AttValue ::= '' ([^] | Reference)* '' | ' ([^'] | Reference)*
'
which I read as: Any Reference character is valid, except and , which are
used for escaping and closing the element.
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +eli.bendersky, scoder
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18753
___
___
Kees Bos added the comment:
OK. I got clarification from the lxml list. It's not a bug. And it's sepcified
in section 2.4 (http://www.w3.org/TR/REC-xml/#syntax):
The ampersand character () and the left angle bracket () MUST NOT appear in
their literal form, except when used as markup
Changes by Kees Bos k@capitar.com:
--
resolution: - invalid
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18753
___
___
R. David Murray added the comment:
Not a problem, these things are often subtle. And now there is a record of it
in the tracker if anyone else questions it in the future.
--
stage: - committed/rejected
___
Python tracker rep...@bugs.python.org