Skip to content

Commit bd63490

Browse files
committed
test: add charachter reference tests for raw escapable elements
1 parent e7f11a0 commit bd63490

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Lib/test/test_htmlparser.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,9 +397,15 @@ def test_convert_charrefs(self):
397397
('starttag', 'script', []), ('data', text),
398398
('endtag', 'script'), ('data', '"'),
399399
('starttag', 'style', []), ('data', text),
400-
('endtag', 'style'), ('data', '"')]
400+
('endtag', 'style'), ('data', '"'),
401+
('starttag', 'title', []), ('data', text),
402+
('endtag', 'title'), ('data', '"'),
403+
('starttag', 'textarea', []), ('data', text),
404+
('endtag', 'textarea'), ('data', '"')]
401405
self._run_check('{1}<script>{0}</script>{1}'
402-
'<style>{0}</style>{1}'.format(text, charref),
406+
'<style>{0}</style>{1}'
407+
'<title>{0}</title>{1}'
408+
'<textarea>{0}</textarea>{1}'.format(text, charref),
403409
expected, collector=collector())
404410
# check truncated charrefs at the end of the file
405411
html = '&quo &# &#x'

0 commit comments

Comments
 (0)