Kevin Stock added the comment:
A workaround is to call close() after feed(), which I supposed I should have
done anyways. However, this does not resolve the issue that the two cases
behave so differently.
The code that causes the difference is lines 351-355 of parser.py, which also
has a
New submission from Kevin Stock :
Given the input '', HTMLParser only detects the opening x
tag, and then stops parsing. Ideally this should behave like the case '' which raises an error and then can continue parsing the close x
tag.
--
components: Library