[New-bugs-announce] [issue41956] Regression in HTMLParser on malformed tags

Dan report at bugs.python.org
Tue Oct 6 05:02:38 EDT 2020


New submission from Dan <negativeiq at gmail.com>:

The attached HTML document (pulled from a Samsung printer web interface) contains the following invalid HTML tag:
<img style="vertical-align:bottom;" ,="" src="images/sws/icon_alert_warning_16.gif" title="Warning">
(invalid because of ,="")
In Python 3.x completely stops the HTML parser, preventing any further tags from being parsed. This does not happen in Python 2.x
See the attached Python script, which counts the number of "input" tags. When executed using Python 2.7, it correctly counts 4 such tags. When executed using Python 3.8 it only finds 1.

----------
components: Library (Lib)
files: testhtmlparse.zip
messages: 378101
nosy: dan
priority: normal
severity: normal
status: open
title: Regression in HTMLParser on malformed tags
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file49497/testhtmlparse.zip

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


More information about the New-bugs-announce mailing list