[issue17802] html.HTMLParser raises UnboundLocalError:

Ezio Melotti report at bugs.python.org
Tue Apr 23 07:33:00 CEST 2013


Ezio Melotti added the comment:

Thanks for the patch Thomas!
Starting from your work I made an updated patch that fixes the bug, but at the same time the tests revealed another possible issue.
In case of invalid character references, HTMLParser still calls handle_entityref instead of reporting them as 'data'.  Not sure what the preferable behavior should be though, but anyway this is a separate issue.

----------
stage: needs patch -> patch review
Added file: http://bugs.python.org/file29986/issue17802.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17802>
_______________________________________


More information about the Python-bugs-list mailing list