This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients Chenyun Yang, ezio.melotti, josh.r, martin.panter, xiang.zhang
Date 2015-10-01.02:05:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1443665115.49.0.126579485236.issue25258@psf.upfronthosting.co.za>
In-reply-to
Content
My thinking is that the knowledge that <img> does not have a closing tag is at a higher level than the current HTMLParser class. It is similar to knowing where the following HTML implicitly closes the <li> elements:

<ul><li>Item A<li>Item B</ul>

In both cases I would not expect the HTMLParser to report “virtual” empty or closing tags. I don’t think it should report an empty <img/> or closing </img> tag just because that is easy to do, because it would be inconsistent with other implied HTML tags. But maybe see what other people say.

I don’t know your particular use case, but I would suggest if you need to parse non-XML HTML <img> tags, use the handle_starttag() method and don’t rely on the end tag :)
History
Date User Action Args
2015-10-01 02:05:15martin.pantersetrecipients: + martin.panter, ezio.melotti, josh.r, xiang.zhang, Chenyun Yang
2015-10-01 02:05:15martin.pantersetmessageid: <1443665115.49.0.126579485236.issue25258@psf.upfronthosting.co.za>
2015-10-01 02:05:15martin.panterlinkissue25258 messages
2015-10-01 02:05:14martin.pantercreate