Problem with escaped double quotes
Aitor asked:
My problem is this :
<dtml-let foo=3D" ' blaublau : " fdsaf " df ' "> </dtml-let>
It doesn't work 'cause I can't escape the doble quotes inside the string= I'm trying to eval.
Any solution???
If I recall correctly, the work around I've used is to store the text, including the double quotes, as a property of a parent folder, so that it can be found by acquisition. for example, create a String Property named "fdsaf_alias" with a value of : " fdsaf " and then change your DTML to : <dtml-let foo=3D" ' blaublau : " + fdsaf_alias + " df ' "> Other than that, reconsider whether there might be a way to do this with single quotes. HTML will usually accept either single or double quotes, but nesting quotes is of course the common reason to use both types in an expression. Since I have no idea what the item actually represents, it's not a call I can make from this end. Good Luck! Jery S.
Another option... if you care ;-> is to use _.chr() to include any ascii character.. <dtml-let foo="'Look-->' + _.chr(0x22) + '<-- Here '"> <dtml-var foo> </dtml-let> produces.. Look-->"<-- Here -steve
"Spicklemire," == Spicklemire, Jerry <Jerry.Spicklemire@IFLYATA.COM> writes:
Spicklemire,> Aitor asked: >> My problem is this : >> >> <dtml-let foo=3D" ' blaublau : " fdsaf " df ' "> </dtml-let> >> >> It doesn't work 'cause I can't escape the doble quotes inside >> the string= I'm trying to eval. >> >> Any solution??? Spicklemire,> If I recall correctly, the work around I've used is Spicklemire,> to store the text, including the double quotes, as a Spicklemire,> property of a parent folder, so that it can be found Spicklemire,> by acquisition. Spicklemire,> for example, create a String Property named Spicklemire,> "fdsaf_alias" with a value of : Spicklemire,> " fdsaf " Spicklemire,> and then change your DTML to : Spicklemire,> <dtml-let foo=3D" ' blaublau : " + fdsaf_alias + " Spicklemire,> df ' "> Spicklemire,> Other than that, reconsider whether there might be a Spicklemire,> way to do this with single quotes. HTML will usually Spicklemire,> accept either single or double quotes, but nesting Spicklemire,> quotes is of course the common reason to use both Spicklemire,> types in an expression. Since I have no idea what Spicklemire,> the item actually represents, it's not a call I can Spicklemire,> make from this end. Spicklemire,> Good Luck! Jery S. Spicklemire,> _______________________________________________ Zope Spicklemire,> maillist - Zope@zope.org Spicklemire,> http://lists.zope.org/mailman/listinfo/zope ** No Spicklemire,> cross posts or HTML encoding! ** (Related lists - Spicklemire,> http://lists.zope.org/mailman/listinfo/zope-announce Spicklemire,> http://lists.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Spicklemire, Jerry -
Steve Spicklemire