[issue8319] HTMLparser does not handle call to handle_data when a tag contains no data.

Senthil Kumaran report at bugs.python.org
Tue Apr 6 06:29:53 CEST 2010


Senthil Kumaran <orsenthil at gmail.com> added the comment:

But changing the HTMLParser.goahead's way to treating tags from
if i < j: self.handle_data(rawdata[i:j]) TO
if i <= j: self.handle_data(rawdata[i:j]

is not the correct way to deal with this problem. Theoretically, whatever it is doing seems correct. As there is no data, don't call handle_data.

I can understand your testcase, and I think there is some other way to handle the test you are mentioning.

If you change the above line, many of the existing tests may fail, so that *may not be* way to go.

----------

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


More information about the Python-bugs-list mailing list