Author Tomalak
Recipients Tomalak, sechi_francesco
Date 2009-05-06.13:42:31
SpamBayes Score 0.000167058
Marked as misclassified No
Message-id <>
@Francesco Sechi: Would it not just require a minimal change to the
_write_data() method? Something along the lines of (sorry, no Python
expert, maybe I am way off):

def _write_data(writer, data, is_attrib=False):
    "Writes datachars to writer."
    if is_attrib: 
        data = data.replace("\r", "&#13;").replace("\n", "&#10;")
    data = data.replace("&", "&amp;").replace("<", "&lt;")
    data = data.replace("\"", "&quot;").replace(">", "&gt;")

and in Element.writexml():

    for a_name in a_names:
        writer.write(" %s=\"" % a_name)
        _write_data(writer, attrs[a_name].value, True)
Date User Action Args
2009-05-06 13:42:33Tomalaksetrecipients: + Tomalak, sechi_francesco
2009-05-06 13:42:33Tomalaksetmessageid: <>
2009-05-06 13:42:32Tomalaklinkissue5752 messages
2009-05-06 13:42:31Tomalakcreate