[Zope] Quotes in DTML (Python) expressions(was: [Zope] HTML-Code in variables (addition)) (was: [Zope] HTML-Code in variables (addition))

2000-10-07 Thread Dieter Maurer

Lars Heber writes:
  dtml-let text="my html text with a link to a
  href="http://www.yahoo.com"Yahoo!/a"
dtml-let text="'my html text with a link to a 
href=\x22http://www.yahoo.com\x22Yahoo!/a'"

I.e. you use Python's hexadecimal (or octal) quoting for '"' (\x22)
inside the Python string.


Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] HTML-Code in variables (addition)

2000-10-07 Thread Tino Wildenhain

Hi Lars,

Lars Heber wrote:
 
 Sorry, I mixed something up. Normal html is no problem at all.
 The problem is how to use quotes or such things.
 
 Of course I get an error by typing:
 
 dtml-let text="my html text with a link to a
 href="http://www.yahoo.com"Yahoo!/a"
 
 I tried typing quot; instead of ", but then the "quot;" also goes into
 the html code on my page - thus the link is broken...
 
 Are there any possibilities to let Zope change the quot; into ", or
 perhaps there is another way to do it like with the \" in C.

Yes, there is. Use documenttemplates for this. This is exactly what Zope
is designed for :-)
I.e. make an dtml-method with the text instead of trying to build it
like
this.

Regards
Tino

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )