[ZPT] CVS: Releases/Zope/lib/python/TAL/tests - test_htmltalparser.py:1.26
Matthew T. Kromer
matt@zope.com
Fri, 10 May 2002 16:54:17 -0400
Update of /cvs-repository/Releases/Zope/lib/python/TAL/tests
In directory cvs.zope.org:/tmp/cvs-serv21465
Modified Files:
test_htmltalparser.py
Log Message:
Route html end tag inside html comment inside a CDATA mode triggering tag
from 2.5 branch.
=== Releases/Zope/lib/python/TAL/tests/test_htmltalparser.py 1.25 => 1.26 ===
self.assertRaises(HTMLTALParser.NestingError, check)
+ def check_cdata_mode(self):
+ """This routine should NOT detect an error with an end tag </a> not
+ matching the start <script> tag. The contents are within a
+ HTML comment, and should be ignored.
+ """
+ s = """<script>\n<!--\ndocument.write("</a>");\n// -->\n</script>"""
+ output = [
+ rawtext(s),
+ ]
+ self._run_check(s, output)
+
def check_code_attr_syntax(self):
output = [
rawtext('<a b="v" c="v" d="v" e></a>'),