[Zope] Re: structure usage question
Evan Simpson
evan@4-am.com
Mon, 23 Sep 2002 15:13:12 -0500
Lynn Ranen wrote:
> After some hoop-jumping, I have this:
> <a tal:attributes="href python:'Reports.py?doit&task_id=%s' %(taskid)">
> foo </a>
This could be more simply written as:
tal:attributes="href string:Reports.py?doit&task_id=$taskid"
> The problem is that the ampersand is being escaped. The docs say the
> "structure" keyword will prevent this, but I have been unable to get the
> "structure" working in:
>
> -- attributes statement
> -- global variable definition statement
> -- local variable definition statement
The "structure" keyword is only meaningful for TAL statements that can
insert unescaped text (content, replace, and on-error). Variable
definitions do not insert text, and the text inserted by the attributes
statement must always be escaped (see w3c spec). Try it; it's not
actually a problem.
Cheers,
Evan @ 4-am