[issue5752] xml.dom.minidom does not escape CR, LF and TAB characters within attribute values
Daniele Varrazzo
report at bugs.python.org
Thu Mar 28 11:17:03 CET 2013
Daniele Varrazzo added the comment:
ElementTree issue is with tabs:
In [1]: import xml.etree.cElementTree as etree
In [2]: doc = etree.fromstring('<xml />')
In [4]: doc.set('attr', "here\tthere")
In [5]: etree.tostring(doc)
Out[5]: '<xml attr="here\tthere" />'
In [6]: etree.fromstring(_5).attrib['attr']
Out[6]: 'here there'
bye bye tab.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5752>
_______________________________________
More information about the Python-bugs-list
mailing list