mirror of
https://github.com/python/cpython.git
synced 2025-09-17 22:20:23 +00:00
#14538: HTMLParser can now parse correctly start tags that contain a bare /.
This commit is contained in:
parent
a72aa843b6
commit
c45868ec69
3 changed files with 16 additions and 3 deletions
|
@ -260,6 +260,16 @@ text
|
|||
('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