Re: preventing escaping of less-than and greater-thans in tal:replace

Charlie Clark <[email protected]> Mon, 14 Aug 2006 19:17:21 +0200
Newsgroups gmane.comp.web.zope.page-templates
Message-ID <[email protected]>
Am 14.08.2006 um 19:13 schrieb Don Morrison:

> When doing the following:
>
>      <span tal:define=3D"r record/name; id record/task_id; mylt
> string:'<'; mygt string:'>';"
>            tal:replace=3D"string:${mylt}option label=3D'${r}'
> value=3D'${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! =20=

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 =20
the Zope Book in the chapters on PageTemplates.

Charlie

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