[Zope] quote escaping in DTML
Milos Prudek
milos.prudek@tiscali.cz
Wed, 20 Feb 2002 15:33:50 +0100
Dieter Maurer wrote:
> Milos Prudek writes:
> > ... quoting ' ...
> You can use triple quotes to enclose your string.
> Such strings may contain single quotes unless they are at the start
> or end of the string or happen to be three in a row:
>
> '''This is a triple quoted string. It may contain '.'''
You are right.
But I found out that this advice can't be used in this particular case,
because DTML rendering is impossible INSIDE the tag tag.
In practical example:
<dtml-var "tag(name=name, alt=name, onMouseOut='MM_swapImgRestore()',
onMouseOver='''MM_swapImage('<dtml-var fld>','','',0)''')">
Here, <dtml-var fld> is not rendered but is reprinted verbatim. It's
logical - you can't call <dtml-var> from <dtml-var>.... :-)
Can you see any other way except reconstructing IMG SRC like I did in my
post of Feb 6 2002 ?
--
Milos Prudek