[Zope] python: calling DTML-methods without quoting

Peter Bengtsson peter at fry-it.com
Tue Oct 4 11:10:11 EDT 2005


No.
<dtml-var "somePath.someDTML"> returns a "pointer" to that object
called someDTML. Not it's rendered content.
<dtml-var "somePath.someDTML(_, REQUEST)"> does the same as <dtml-with
somePath><dtml-var someDTML></dtml-with> (sort of)

There's a big difference between
<dtml-var "somePath.someDTML(_, REQUEST)">
and
<dtml-var "somePath.someDTML(_, REQUEST)" html_quote>

Either I didn't understand your question or this answers it for you.


2005/10/4, Chris <chris-zopemailing at gmx.de>:
> Hi,
>
> I hope this is not a FAQ, but I looked for some info to no avail.
>
> If I call a DTML-Method from an other Method (e.g. <dtml-var someDTML>),
>   HTML entities are not converted.
>
> However if I call it from python (e.g. <dtml-var "somePath.someDTML">
> the entities are html_quoted.
>
> This changed with Zope 2.7.x (?). Before that DTMLMethods were not
> quoted when called from python.
>
> I know the easy workaround is to dtml-with to the namespace of the
> object and call it the zope-way.
>
> I have a customer with several large applications which run on an old
> Zope only for the described reason. The applications relay heavily on
> calling DTML-Methods to include pieces of HTML, JavaScript, etc.
> Changing the old code would be an enormous effort.
>
> Is there a way to patch zope to show the old behavior?
>
> Regards
> Chris
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>


--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com


More information about the Zope mailing list