Subject changed: Bug in combining htmlentitydefs.py and ElementTree?
"Martin v. Löwis"
martin at v.loewis.de
Thu Dec 27 09:11:48 EST 2007
> Sorry for the top posting - I found out that the problem I encountered
> was not something new in Python 3.0.
See Fredrik's message. The problem is not with htmlentitydefs, but with
your usage of ElementTree - in ElementTree, the .entity dictionary
values are not again parsed, apparently causing the '&' to be taken
as a literal ampersand, and not as markup.
That said, it *would* be possible to change htmlentitydefs in Python
3.0, to always map to Unicode characters; this would not be possible for
2.x (as Fredrik points out).
Regards,
Martin
More information about the Python-list
mailing list