[Zope] HTML quotes

Phillip J. Eby pje@telecommunity.com
Mon, 30 Aug 1999 21:39:41 -0500


At 07:38 PM 8/30/99 -0500, Victor Ng wrote:
>I've got a DTML document (id = review) with just straight HTML in it like
>this:
>
><P>just some text</P>
>
>When I call it using <dtml-var review> it comes out ok, but when I call it
>from the parent as <dtml-var "_['child'].review">, the Zope returns the
>HTML code with all of the angle brackets coming back as HTML character
>entities.  What's going on here?  I'm using Zope 2.0b6
>

When say <dtml-var somevar>, you get the result of *executing* somevar, but
if you say <dtml-var "somevar"> you will get somevar itself.  It's somewhat
like using a single-quote in LISP, which gives you a thing literally
instead of what it stands for.

Here are several ways to get what you want:

<dtml-with child><dtml-var review></dtml-with>
<dtml-var "child.review(_.None,_)">
<dtml-var "_.render(_,child.review)">

See the DTML guide for explanations.