Skip to content

Commit 1241a65

Browse files
committed
test: add character reference and ambiguous ampersand test cases
1 parent 420af54 commit 1241a65

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Lib/test/test_htmlparser.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -319,17 +319,15 @@ def get_events(self):
319319

320320
def test_escapable_raw_text_content(self):
321321
contents = [
322-
'<h2>This is a header</h2>',
323-
'Rebelious<h1>Heading'
324-
'<!-- not a comment --> &not-an-entity-ref;',
325-
"<not a='start tag'>",
326-
'<a href="" /> <p> <span></span>',
327-
'foo = "</scr" + "ipt>";',
328322
'foo = "</TITLE" + ">";',
329323
'foo = <\n/title> ',
330324
'<!-- document.write("</scr" + "ipt>"); -->',
331325
'\n//<![CDATA[\n'
332326
'\n<!-- //\nvar foo = 3.14;\n// -->\n',
327+
# valid character reference
328+
'&#65;',
329+
# ambiguous ampersand example
330+
'&notaref',
333331
'foo = "</sty" + "le>";',
334332
'<!-- \u2603 -->',
335333
# these two should be invalid according to the HTML 5 spec,

0 commit comments

Comments
 (0)