[ZPT] "structure" and TAL interpretation

Fred Drake fdrake at gmail.com
Fri Jul 23 11:26:07 EDT 2004


On Fri, 23 Jul 2004 16:06:13 +0100, Jean-Michel Hiver <jhiver at mkdoc.com> wrote:
> The way I've implemented this in Petal (the Perl 'evil twin' of ZPT), is
> to always HTML-encode the result of the evaluation of TALES expressions
> unless the keyword 'structure' is there.
> 
> So 'structure' is really a keyword that says "this string is already
> encoded buddy, don't double-encode it".

Except in the Python implementation, saying "structure" also means to
re-evaluate TAL markup returned as part of the replacement.  So I'd
claim that Petal doesn't implement the same language as the TAL (Zope
2) or zope.tal (Zope 3) Python packages.

What's interesting to note is that this re-evaluation of the
replacement text for "structure" doesn't seem to be mentioned in the
specification:

http://zope.org/Wikis/DevSite/Projects/ZPT/TAL%20Specification%201.4


  -Fred

-- 
Fred L. Drake, Jr.    <fdrake at gmail.com>


More information about the ZPT mailing list