How to handle self-closing tags without end-slash in html.parser.HTMLParser
By default it seems that html.parser.HTMLParser
cannot handle self closing tags correctly, if they are not terminated using /
. E.g. it handles <img src="asfd"/>
fine, but it incorrectly handles <img scr="asdf">
by considering it as a non-self closing tag.