This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author strangefeatures
Recipients effbot, ods, strangefeatures
Date 2009-11-24.16:09:12
SpamBayes Score 2.3118303e-06
Marked as misclassified No
Message-id <1259078957.56.0.959172293741.issue5166@psf.upfronthosting.co.za>
In-reply-to
Content
I'm also of the opinion that this would be a valuable feature to have. I
think it's a reasonable expectation that an XML library produces valid
XML. It's particularly strange that ET would output XML that it can't
itself read. Surely the job of making the input valid falls on the XML
creator - that's the point of using libraries in the first place, to
abstract away from details like not being able to use characters in the
0-32 range, in the same way that ampersands etc are auto-escaped.
Granted, it's not as clear-cut here since the low-range ASCII characters
are likely to be less frequent and the strategy to handle them is less
clear. I think the sanest behaviour would be to raise an exception by
default, although a user-configurable option to replace or omit the
characters would also make sense. If impacting performance is a concern,
maybe it would make sense to be off by default, but I would have thought
that the single regex that could perform the check would have relatively
minimal impact - and it seems to be an acceptable overhead on the
parsing side, so why not on generation?
History
Date User Action Args
2009-11-24 16:09:17strangefeaturessetrecipients: + strangefeatures, effbot, ods
2009-11-24 16:09:17strangefeaturessetmessageid: <1259078957.56.0.959172293741.issue5166@psf.upfronthosting.co.za>
2009-11-24 16:09:13strangefeatureslinkissue5166 messages
2009-11-24 16:09:12strangefeaturescreate