[issue17802] html.HTMLParser raises UnboundLocalError:

2013-05-01 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the report! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue17802] html.HTMLParser raises UnboundLocalError:

2013-05-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9cb90c1a1a46 by Ezio Melotti in branch '3.3': #17802: Fix an UnboundLocalError in html.parser. Initial tests by Thomas Barlow. http://hg.python.org/cpython/rev/9cb90c1a1a46 New changeset 20be90a3a714 by Ezio Melotti in branch 'default': #17802: me

[issue17802] html.HTMLParser raises UnboundLocalError:

2013-04-22 Thread Ezio Melotti
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

[issue17802] html.HTMLParser raises UnboundLocalError:

2013-04-22 Thread Thomas Barlow
Thomas Barlow added the comment: Just adding a patch here with a few unit tests to demonstrate the issue, comments here are welcome. This is my first patch, I believe I have put the tests in the correct place. It appears the problem only occurs if there is an incomplete XML entity where a se

[issue17802] html.HTMLParser raises UnboundLocalError:

2013-04-20 Thread Ezio Melotti
Changes by Ezio Melotti : -- assignee: -> ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue17802] html.HTMLParser raises UnboundLocalError:

2013-04-20 Thread R. David Murray
R. David Murray added the comment: Thanks for the report. Yes, that's in a complicated bit of error recovery code, and clearly you found a path through it that doesn't have a corresponding test :) -- keywords: +easy nosy: +ezio.melotti, r.david.murray stage: -> needs patch type: cras

[issue17802] html.HTMLParser raises UnboundLocalError:

2013-04-20 Thread Baptiste Mispelon
New submission from Baptiste Mispelon: When trying to parse the string `a&b`, the parser raises an UnboundLocalError: {{{ >>> from html.parser import HTMLParser >>> p = HTMLParser() >>> p.feed('a&b') >>> p.close() Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3