[issue5752] xml.dom.minidom does not escape newline characters within attribute values

Tomalak report at bugs.python.org
Wed May 13 13:57:21 CEST 2009


Tomalak <M8R-t1tut01 at mailinator.com> added the comment:

Daniel Diniz: 

The proposed behaviour is correct:
http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping

"In attribute values, the character information items 
TAB (#x9), newline (#xA), and carriage-return (#xD) 
are represented by "&#x9;", "&#xA;", and "&#xD;" respectively."

Since the behaviour is correct, it is also desirable. :-)

I don't think that this change could cause existing solution to break
since the current inconsistency in handling these characters make it
impossible to rely on this anyway.

Thanks for putting up the unit test diff.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5752>
_______________________________________


More information about the Python-bugs-list mailing list