#14538: HTMLParser can now parse correctly start tags that contain a bare /.

This commit is contained in:
Ezio Melotti 2012-04-18 19:18:22 -06:00
parent cc19140607
commit 0780b6bc58
3 changed files with 16 additions and 3 deletions

View file

@ -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 $ ')])