mirror of
https://github.com/python/cpython.git
synced 2025-10-25 18:54:53 +00:00
gh-135661: Fix parsing unterminated bogus comments in HTMLParser (GH-137873)
Bogus comments that start with "<![CDATA[" should not include the starting "!" in its value.
This commit is contained in:
parent
eac37b46d9
commit
7636a66635
2 changed files with 9 additions and 15 deletions
|
|
@ -791,7 +791,7 @@ def test_eof_in_cdata(self, content):
|
|||
self._run_check('<![CDATA[' + content,
|
||||
[('unknown decl', 'CDATA[' + content)])
|
||||
self._run_check('<![CDATA[' + content,
|
||||
[('comment', '![CDATA[' + content)],
|
||||
[('comment', '[CDATA[' + content)],
|
||||
collector=EventCollector(autocdata=True))
|
||||
self._run_check('<svg><text y="100"><![CDATA[' + content,
|
||||
[('starttag', 'svg', []),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue