[Python-ideas] Add "htmlcharrefreplace" error handler

Steven D'Aprano steve at pearwood.info
Fri Jun 14 17:50:51 CEST 2013


On 15/06/13 01:37, Serhiy Storchaka wrote:
> 14.06.13 18:20, Steven D'Aprano написав(ла):
>> On 14/06/13 19:22, Antoine Pitrou wrote:
>>> It's not trivial, it's additional C code in an important part of the
>>> language (unicode and codecs).
>>
>> Or, it's 17 lines of Python. Something like this is a good start:
[...]
> Actually '&#%d;' % n. See also my sample implementation in original post which reuses xmlcharrefreplace_errors.

So you did. I'm sorry for the noise, I missed your original implementation.


-- 
Steven


More information about the Python-ideas mailing list