[Zope-dev] Escape characters in dtml

Jim Sanford jsanford@atinucleus.com
Mon, 1 May 2000 13:23:40 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_00AD_01BFB370.773D5340
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Try:

<dtml-call "REQUEST.set('FUTURE_URL','<A =
href=3D'+_.chr(34)+'adocument?id=3D133'+_.chr(34)+'>click</A>' )">
  ----- Original Message -----=20
  From: Adam Pawliuk=20
  To: zope-dev@zope.org=20
  Sent: Monday, May 01, 2000 1:47 PM
  Subject: [Zope-dev] Escape characters in dtml


  Hi,

  I'm having problems trying to escape a double quotes in a DTML call.

  For example:

  <dtml-call "REQUEST.set('FUTURE_URL','<A =
href=3D"adocument?id=3D133">click</A>' )">

  The double quotes for the 'href' cause problems with the expression =
double quotes. I tried escaping with \" but this doesn't work either.

  Any suggestions?

  Thanks in advance.

------=_NextPart_000_00AD_01BFB370.773D5340
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2722.2800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Try<FONT face=3DArial size=3D2>:</FONT></FONT></DIV>
<DIV><FONT size=3D2>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;dtml-call =
"REQUEST.set('FUTURE_URL','&lt;A=20
href=3D'+_.chr(34)+'adocument?id=3D133'+_.chr(34)+'&gt;click&lt;/A&gt;'=20
)"&gt;</FONT></DIV></FONT>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
  <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A href=3D"mailto:apawliuk@aui.ca" title=3Dapawliuk@aui.ca>Adam =
Pawliuk</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
href=3D"mailto:zope-dev@zope.org"=20
  title=3Dzope-dev@zope.org>zope-dev@zope.org</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Monday, May 01, 2000 1:47 =
PM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> [Zope-dev] Escape =
characters in=20
  dtml</DIV>
  <DIV><BR></DIV>
  <DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>I'm having problems trying to escape =
a double=20
  quotes in a DTML call.</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>For example:</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>&lt;dtml-call =
"REQUEST.set('FUTURE_URL','&lt;A=20
  href=3D"adocument?id=3D133"&gt;click&lt;/A&gt;' )"&gt;</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>The double quotes for the 'href' =
cause problems=20
  with the expression double quotes. I tried escaping with \" but this =
doesn't=20
  work either.</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>Any suggestions?</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>Thanks in=20
advance.</FONT></DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_00AD_01BFB370.773D5340--