Author mefistotelis
Recipients mefistotelis, scoder, serhiy.storchaka
Date 2020-02-10.00:24:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1581294268.66.0.931362343079.issue39011@roundup.psfhosted.org>
In-reply-to
Content
Patch attached.

I was thinking about one for() instead, but didn't wanted to introduce too large changes..

Let me know if you would prefer something like:

    for i in (9,10,13,):
        if chr(i) not in text: continue
        text = text.replace(chr(i), "&#{:02d};".format(i))

That would also make it easy to extend for other chars, ie. if we'd like  the parser to be always able to re-read the XML we've created. Currently, placing control chars in attributes will prevent that. But I'm getting out of scope of this issue now.
History
Date User Action Args
2020-02-10 00:24:28mefistotelissetrecipients: + mefistotelis, scoder, serhiy.storchaka
2020-02-10 00:24:28mefistotelissetmessageid: <1581294268.66.0.931362343079.issue39011@roundup.psfhosted.org>
2020-02-10 00:24:28mefistotelislinkissue39011 messages
2020-02-10 00:24:28mefistoteliscreate