[ZPT] Tags are URL ecaped when calling a script from ZPT

Richard Jones rjones@ekit-inc.com
Wed, 23 Jan 2002 13:11:24 +1100


On Wed, 23 Jan 2002 12:59, Damir Bartakovic wrote:
> Hi there,
>
> Following problem,
>
> I have a small PYTHON Script "fetch_companies" which I would like to use
> in several ZPTs:
>
> print '<select name="fk_Com_CompanyID"> \
>       <option value="" />select \
>       <div tal:repeat="comp here/Companies/SearchMethod"> \
>         <option value="" tal:attributes="value comp/pk_com_companyid"/>
> <div tal:replace="comp/com_name" /> \ </div> \
>     </select>'
>
> return printed
>
>
> Now I try to call it from a ZPT:
> <div tal:replace="here/fetch_companies">Here goes the company</div>
>
> Unfortunately the tags are escaped to &lt; and &gt;
> How can I prevent this?

Use the "structure" option:

<div tal:replace="structure here/fetch_companies">Here goes the company</div>


     Richard