[Zope3-dev] Bad handling of <script> tag?
Sidnei da Silva
sidnei at awkly.org
Mon Jul 12 10:13:39 EDT 2004
Hello,
I've just stumbled on a mismatch between the TAL implemetations on
Zope 2 and Zope 3.
In Zope 2, the following is accepted in a page template:
<script type="text/javascript">
// <![CDATA[
if (cookiesEnabled && !cookiesEnabled()) {
document.writeln('<div class="portalMessage"><img src="info.gif"/>Cookies are not enabled. You can not log in if they are turned off. <a href="enabling_cookies">How to enable cookies</a>.</div>');
}
// ]]>
</script>
However, in Zope 3, it fails with a NestingError:
ERROR:root:PageTemplateFile: Error in template: Compilation failed
zope.tal.htmltalparser.NestingError: Open tags <html>, <body>, <div>,
<script> do not match close tag </a>, at line 63, column 189
AFAICS, Zope 2 had some special handling for this, which was done on
it's own HTMLParser module, which seems to have been moved into
Python's stdlib almost untouched. However, I can't seem to spot why it
isnt behaving accordingly.
Any help is appreciated!
--
Sidnei da Silva <sidnei at awkly.org>
http://awkly.org - dreamcatching :: making your dreams come true
http://www.enfoldsystems.com
http://plone.org/about/team#dreamcatcher
Real programmers don't comment their code. It was hard to write, it
should be hard to understand.
More information about the Zope3-dev
mailing list