[issue25258] HtmlParser doesn't handle void element tags correctly

karl report at bugs.python.org
Mon Jan 4 20:29:11 EST 2021


karl <karl+pythonbugs at la-grange.net> added the comment:

The parsing rules for tokenization of html are at 
https://html.spec.whatwg.org/multipage/parsing.html#tokenization

In the stack of open elements, there are specific rules for certain elements. 
https://html.spec.whatwg.org/multipage/parsing.html#special

from a DOM point of view, there is indeed no difference in between 
<img src="somewhere"><img src="somewhere"/>

https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cimg%20src%3D%22somewhere%22%3E%3Cimg%20src%3D%22somewhere%22%2F%3E

----------
nosy: +karlcow

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue25258>
_______________________________________


More information about the Python-bugs-list mailing list