Hello, How do you escape " in a <dtml-call> ?? What I need to do is this: <dtml-call "REQUEST.set('head', '<meta name="author" content="' + author + '" />')"> Off cource this gives me an error :-( I have tried with adding a \ in front of the "'s but it doesn't help. Any good ideas ?? -- Gitte Wange Jensen Sys Admin, Developer and a lot more MMmanager.org Aps, Denmark Phone: +45 29 72 79 72 Email: gitte@mmmanager.org Web: www.mmmanager.org Quote of the day: The 'Manager' role in Zope is like a hot knife through butter. - Rob Page, Phone conversation, Tuesday, May 29, 2001
On Fri, Oct 05, 2001 at 11:59:16AM +0200, Gitte Wange wrote:
How do you escape " in a <dtml-call> ??
You cannot - DTML parser is too simple. Use _.chr(34) instead. Oleg. ---- Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
On fre, 2001-10-05 at 12:11, Oleg Broytmann wrote:
On Fri, Oct 05, 2001 at 11:59:16AM +0200, Gitte Wange wrote:
How do you escape " in a <dtml-call> ??
You cannot - DTML parser is too simple. Use _.chr(34) instead.
Sorry I don't know what _.chr(34) is .... please explain. -- Gitte Wange Jensen Sys Admin, Developer and a lot more MMmanager.org Aps, Denmark Phone: +45 29 72 79 72 Email: gitte@mmmanager.org Web: www.mmmanager.org Quote of the day: The 'Manager' role in Zope is like a hot knife through butter. - Rob Page, Phone conversation, Tuesday, May 29, 2001
On Fri, Oct 05, 2001 at 12:16:24PM +0200, Gitte Wange wrote:
On fre, 2001-10-05 at 12:11, Oleg Broytmann wrote:
On Fri, Oct 05, 2001 at 11:59:16AM +0200, Gitte Wange wrote:
How do you escape " in a <dtml-call> ??
You cannot - DTML parser is too simple. Use _.chr(34) instead.
Sorry I don't know what _.chr(34) is .... please explain.
I have not much time, sorry. Read docs. In short: _ isnamespace, chr is python function to convert int to char. Example: <dtml-var "_.string.replace(title, _.chr(34), ' ')"> will replace all " in title to spaces. Oleg. ---- Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
[Oleg Broytmann]
On Fri, Oct 05, 2001 at 11:59:16AM +0200, Gitte Wange wrote:
How do you escape " in a <dtml-call> ??
You cannot - DTML parser is too simple. Use _.chr(34) instead.
You can escape a single quote in dtml using \' (because it's Python that handles it). So you can do this: <dtml-var "'This is a \'single\' quote'"> Doesn't work for a double quote, though, as Oleg said. Tom P
participants (3)
-
Gitte Wange -
Oleg Broytmann -
Thomas B. Passin