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

Charlie Clark charlie at begeistert.org
Mon Aug 14 13:17:21 EDT 2006


Am 14.08.2006 um 19:13 schrieb Don Morrison:

> 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.

Eek string replacements are so much uglier than Python string format!  
Is it just me who thinks what you're doing is wrong.

Anyway I think what you're after is tal:source which is very much in  
the Zope Book in the chapters on PageTemplates.

Charlie

Charlie Clark
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-938-5360
GSM: +49-178-782-6226





More information about the ZPT mailing list