Commit 070b5be2 authored by Fred Drake's avatar Fred Drake

Add a comment explaining why the new test is wrong.

parent 50b412e9
......@@ -105,6 +105,14 @@ class HTMLTALParserTestCases(TestCaseBase):
matching the start <script> tag. The contents are within a
HTML comment, and should be ignored.
"""
# The above comment is not generally true. The HTML 4 specification
# gives <script> a CDATA content model, which means comments are not
# syntactically recognized (those characters contribute to the text
# content of the <script> element). The '</a' in the '</a>' causes
# the SGML markup-in-context rules to kick in, and '</a>' should then
# be recognized as an improperly nested end tag. See:
# http://www.w3.org/TR/html401/types.html#type-cdata
#
s = """<script>\n<!--\ndocument.write("</a>");\n// -->\n</script>"""
output = [
rawtext(s),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment