[Zope] dtml-in, dtml-var, javascript and keeping quotes

Dieter Maurer dieter at handshake.de
Sun Sep 12 13:14:11 EDT 2004


Richard Rosenberg wrote at 2004-9-11 23:59 +0000:
>Is there a format code (or other way) to do the following:
>
><script language="JavaScript">
>
>var myArray = new Object();
><dtml-in somelist_of_strings prefix="sl">
>myArray[<dtml-var sl_item>]=<dtml-var anotherlist_of_strings[sl_index]>
></dtml-in>
>
></script>
>
>Specifically, I am interested in whether there is a way to force <dtml- 
>var> to
>render the quotes,

Try: '<dtml-var expr="repr(yourString)">'

-- 
Dieter


More information about the Zope mailing list