mirror of
https://github.com/python/cpython.git
synced 2025-08-23 10:16:01 +00:00
#14538: HTMLParser can now parse correctly start tags that contain a bare /.
This commit is contained in:
parent
cc19140607
commit
0780b6bc58
3 changed files with 16 additions and 3 deletions
|
@ -409,6 +409,16 @@ class HTMLParserTolerantTestCase(HTMLParserStrictTestCase):
|
|||
('starttag', 'a', [('foo', None), ('=', None), ('bar', None)])
|
||||
]
|
||||
self._run_check(html, expected)
|
||||
#see issue #14538
|
||||
html = ('<meta><meta / ><meta // ><meta / / >'
|
||||
'<meta/><meta /><meta //><meta//>')
|
||||
expected = [
|
||||
('starttag', 'meta', []), ('starttag', 'meta', []),
|
||||
('starttag', 'meta', []), ('starttag', 'meta', []),
|
||||
('startendtag', 'meta', []), ('startendtag', 'meta', []),
|
||||
('startendtag', 'meta', []), ('startendtag', 'meta', []),
|
||||
]
|
||||
self._run_check(html, expected)
|
||||
|
||||
def test_declaration_junk_chars(self):
|
||||
self._run_check("<!DOCTYPE foo $ >", [('decl', 'DOCTYPE foo $ ')])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue