[Zope] Re[2]: [Zope] Expressions with strings with double-quotations?
Martijn Pieters
Martijn Pieters <mj@digicool.com>
Tue, 21 Dec 1999 16:04:17 +0100
Tuesday, December 21, 1999, 3:34:29 PM, Michel Pelletier wrote:
>> This is (theoretically) as in <dtml-var "'hello \" world'"> -
>> whenever I
>> try anything like this Zope misses the escape and terminates the
>> expression (colorfully)...
MP> This can't be done; You can't get there from here.
Ahem. You can, just use the \xhh.. where hh.. is the hex code of the
character, or use \ooo where ooo is the octal code of the character in
question. See the Python Language Reference:
http://www.python.org/doc/current/ref/strings.html
In this case, use \x22 or \042:
<dtml-var "'hello \x22 world'">
--
Best regards,
Martijn Pieters mailto:mj@digicool.com