[issue26210] `HTMLParser.handle_data` may be invoked although `HTMLParser.reset` was invoked

Xiang Zhang report at bugs.python.org
Wed Jan 27 03:45:08 EST 2016


Xiang Zhang added the comment:

Actually it does move forward since in goahead, it first store a "copy" of the initial self.rawdata and use it to control the flow. If you make some change to self.rawdata when parsing, for example call reset, goahead can not feel it. But methods parse_* can. So the data conflicts.

I think it's not proper to change self.rawdata when parsing. You can easily get various errors by doing that.

----------

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


More information about the Python-bugs-list mailing list