[ZPT] "structure" and TAL interpretation
Jean-Michel Hiver
jhiver at mkdoc.com
Fri Jul 23 11:06:13 EDT 2004
Fred Drake wrote:
>When using tal:content="structure some/path" or tal:replace="structure
>some/path", the TAL interpreter takes the result of some/path and parses it,
>evaluating any TAL attributes included in the structure, before inserting the
>result in the output.
>
>This is a huge performance hit.
>
>Is anybody relying on the current behavior? Is it being found useful?
>
>We're considering adding a new insertion mode, possibly called "unquoted",
>that skips the parsing and evaluation of the result of the expression. This
>would likely first appear in XopeX3 3.1.0, and won't be implemented until
>after ZopeX3 3.0.0 is finished.
>
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".
Cheers,
Jean-Michel.
More information about the ZPT
mailing list