[issue32876] HTMLParser raises exception on some inputs
Irit Katriel
report at bugs.python.org
Thu Sep 9 14:08:59 EDT 2021
Irit Katriel <iritkatriel at gmail.com> added the comment:
I get a different error now:
>>> import html.parser
>>> html.parser.HTMLParser().feed("<![\n")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/iritkatriel/src/cpython-1/Lib/html/parser.py", line 110, in feed
self.goahead(0)
^^^^^^^^^^^^^^^
File "/Users/iritkatriel/src/cpython-1/Lib/html/parser.py", line 178, in goahead
k = self.parse_html_declaration(i)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/iritkatriel/src/cpython-1/Lib/html/parser.py", line 263, in parse_html_declaration
return self.parse_marked_section(i)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/iritkatriel/src/cpython-1/Lib/_markupbase.py", line 144, in parse_marked_section
sectName, j = self._scan_name( i+3, i )
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/iritkatriel/src/cpython-1/Lib/_markupbase.py", line 390, in _scan_name
raise AssertionError(
^^^^^^^^^^^^^^^^^^^^^
AssertionError: expected name token at '<![\n'
----------
nosy: +iritkatriel
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32876>
_______________________________________
More information about the Python-bugs-list
mailing list