Author bmispelon
Recipients bmispelon
Date 2013-04-20.10:58:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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 "<stdin>", line 1, in <module>
  File "/usr/lib/python3.3/html/", line 149, in close
  File "/usr/lib/python3.3/html/", line 252, in goahead
    if k <= i:
UnboundLocalError: local variable 'k' referenced before assignment

Granted, the HTML is invalid, but this error looks like it might have been an oversight.
Date User Action Args
2013-04-20 10:58:16bmispelonsetrecipients: + bmispelon
2013-04-20 10:58:16bmispelonsetmessageid: <>
2013-04-20 10:58:16bmispelonlinkissue17802 messages
2013-04-20 10:58:16bmispeloncreate