[issue18850] xml.etree.ElementTree accepts control chars.
Stefan Behnel
report at bugs.python.org
Tue Aug 27 14:16:01 CEST 2013
Stefan Behnel added the comment:
This is a bit tricky in ET because it generally allows you to stick anything into the Element properties (and that's a feature). So catching this at tree building time (as lxml.etree does) isn't really possible.
However, at least catching it in the serialiser should be possible and would help. Regexes for well-formed tag names and text could do the job.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18850>
_______________________________________
More information about the Python-bugs-list
mailing list