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 ezio.melotti
Recipients BreamoreBoy, brett.cannon, ezio.melotti, martin.panter, rnk, serhiy.storchaka, thomaspinckney3, vstinner
Date 2013-11-19.12:31:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1384864299.72.0.476331620278.issue2927@psf.upfronthosting.co.za>
In-reply-to
Content
Here's an updated patch that addresses comments on rietveld and adds a few more tests and docs.
I should also update the what's new, but I have other upcoming changes in the html package so I'll probably do it at the end.

Regarding your concern:
* if people are only using html.escape, then they will get a couple of extra imports, including all the html5 entities, and a re.compile;
* if people are using html.parser, they already have plenty of re.compiles there, and soon html.parser will use unescape too;
* if people are using html.entities they only get an extra re.compile;

Overall I don't think it's a big problem.

As a side node, the "if '&' in s:" in the unescape function could be removed -- I'm not sure it brings any real advantage.  This could/should be proved by benchmarks.
History
Date User Action Args
2013-11-19 12:31:41ezio.melottisetrecipients: + ezio.melotti, brett.cannon, vstinner, thomaspinckney3, rnk, BreamoreBoy, martin.panter, serhiy.storchaka
2013-11-19 12:31:39ezio.melottisetmessageid: <1384864299.72.0.476331620278.issue2927@psf.upfronthosting.co.za>
2013-11-19 12:31:39ezio.melottilinkissue2927 messages
2013-11-19 12:31:39ezio.melotticreate