[ZPT] preventing escaping of less-than and greater-thans in tal:replace

Don Morrison donmorrison at gmail.com
Mon Aug 14 13:56:41 EDT 2006


Thanks everyone, the following works:

      <option tal:define="r record/name; id record/task_id;"
              tal:attributes="label r; value id" tal:content="r" />

I omit the dummy value since I have several dummy values defined elsewhere.

:)

On 8/14/06, Janko Hauser <jhauser at zscout.de> wrote:
> You are missing tal:attributes
>
> <select tal:define="r record/name; id record/task_id">
> <option tal:attributes="label r; value id" tal:content="r">dummy</
> option>
> </select>
>
> With regards,
>
> __Janko
>
> > When doing the following:
> >
> >      <span tal:define="r record/name; id record/task_id; mylt
> > string:'<'; mygt string:'>';"
> >            tal:replace="string:${mylt}option label='${r}'
> > value='${id}'${mygt}${r}${mylt}/option${mygt}"></span>
> >
> > The less-thans and greater-thans still get html escaped.  How do I
> > prevent this?  Obviously I'm new to zope.  Your answer would probably
> > fit into the Zope Book because I don't see the answer there.
>
> --
> Janko Hauser  email:  jhauser at zscout.de
>               mobile: +49 1721 641552
>
>
>
>
>


More information about the ZPT mailing list