[issue25258] HtmlParser doesn't handle void element tags correctly
Xiang Zhang
report at bugs.python.org
Tue Sep 29 07:22:59 CEST 2015
Xiang Zhang added the comment:
>From the specification, void element has no end tag, so I think this
behaviour can not be called incorrect. For void element, only
handle_starttag is called.
And for start tag ends with '/>', actually HTMLParser calls
handle_startendtag, which invokes handle_starttag and
handle_endtag.
I think there are two solutions, filter void elements in the library
and then invoke handle_startendtag, or filter void elements in the
application in handle_starttag and then invoke handle_endtag.
----------
nosy: +xiang.zhang
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25258>
_______________________________________
More information about the Python-bugs-list
mailing list