21 Mar
2002
21 Mar
'02
1:58 p.m.
On Thu, Mar 21, 2002 at 02:45:46PM +0100, Igor Leturia wrote:
I want to check in dtml if a string variable contains double quotes ("), so I include a python expression in a dtml-if, something like this:
<dtml-if "_.string.find(s,'"')<>-1">
Of course, this doesn't work as the dtml interpreter thinks the " is the end of the python expression. But I tried it with \" also, and it doesn't work.
Any ideas?
DTML parser is too weak. :( <dtml-if "_.string.find(s, _.chr(34)) <> -1"> Oleg. -- Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.