[Zope] Stripping Quotes

Jaroslav Lukesh lukesh at seznam.cz
Tue Sep 4 12:03:35 EDT 2007


Sorry, it was my fault, here are better version:

<dtml-var "_.str('string' + \" + 'with' + \' + 
'quotes').replace(\",'').replace(\','')">

  ----- Original Message ----- 
  From: Tom Von Lahndorff
  To: Zope user list
  Sent: Tuesday, September 04, 2007 5:28 PM
  Subject: Re: [Zope] Stripping Quotes




  doesn't work. the double quotes are not escaped and zope sees them as the 
end of the expression.


  > From: "Jaroslav Lukesh" <lukesh at seznam.cz>
  > Date: August 29, 2007 6:16:12 PM EDT
  > To: "Zope user list" <zope at zope.org>, "Tom Von Lahndorff"
  > <tom at modscape.com>
  > Subject: Re: [Zope] Stripping Quotes
  >
  > <dtml-var "_.str('string\"with\'quotes').replace('\"','').replace
  > ('\'','')">
  >
  >
  > ----- Original Message ----- From: "Tom Von Lahndorff"
  > <tom at modscape.com>
  >
  >
  >> Whats the best way to strip (double and/or single) quotes from a
  >> string in python and/or dtml? Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20070904/2d3959c9/attachment.htm


More information about the Zope mailing list