[Zope] Need ZCatalog help

Martijn Pieters mj@antraciet.nl
Fri, 10 Sep 1999 16:43:05 +0200


At 16:30 10/09/99 , Michel Pelletier wrote:
>John Goerzen wrote:
> >
> > Martijn Pieters <mj@antraciet.nl> writes:
> >
> >
> > > <dtml-call "REQUEST.set('body_text', '"Martijn Pieters" and not "Martijn
> > > Faassen"')">
> >
> > Exceptt that is a quoting problem there, which Zope won't like.  I've
> > been wondering how to solve just a problem myself.  (The first " will
> > be taken as ending the expr for call)
>
>Just escape the double quote "\""
>
>Python is the most flexible 'quoting' language ever.
>
>-Michel

It's not python we are quoting, but HTML.

Try:

  <dtml-var "'My quote (") will not quote'">

and:

  <dtml-var "'My quote (\") will not quote'">

Both will fail. Using an octal value will work:

  <dtml-var "'My quote (\042) will quote'">

which will print

   My quote (") will quote

And so we can do:

  <dtml-call "REQUEST.set('body_text', '\042Martijn Pieters\042 and not 
\042Martijn Faassen\042')">




--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-7502100 Fax: +31-35-7502111
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------