[python-committers] The evolution of HTMLParser

Antoine Pitrou antoine at python.org
Wed Nov 20 21:34:53 CET 2013


On mer., 2013-11-20 at 21:57 +0200, Ezio Melotti wrote:
> Now I'm working on #13633 (Automatically convert character references
> in HTMLParser [1]), and I'm planning to add a convert_charrefs boolean
> flag to the constructors that, when set to True, will automatically
> convert charrefs (e.g. """, """) to the corresponding Unicode
> characters, and avoid calling the handle_charref/handle_entityref
> methods.

How about a separate StandardHTMLParser class that would have the right
handle_charref / handle_entityref implementations?
(you could also change other behaviours in that class if desired)

Regards

Antoine.




More information about the python-committers mailing list