On Mon, May 20, 2013 at 02:21:05AM -0400, Donald Stufft wrote:
>
> On May 20, 2013, at 2:18 AM, Lennart Regebro wrote:
>
> > On Sun, May 19, 2013 at 10:20 PM, Donald Stufft wrote:
> >> Hrm, ZPT doesn't seem to be stripping the CDATA or unescaping the strings?
> >>
> >> https://gist.github.com/dstufft/5608838 is what i have in the template
> >> file and that appears verbatim in the output?
> >
> > Yes? It will escape *data* inserted into the template (unless told not
> > to), but what is in the template will appear in the output unescaped.
> > I'm not sure how any template system can work otherwise, but perhaps
> > I've been using Zope too long. :-)
> >
> > //Lennart
>
> Maybe you can tell me what I'm doing wrong?
Using zope.pagetemplate. ;)
More seriously, zope.pagetemplate has two parsing modes: HTML and XML.
Nobody actually uses the XML mode (pt files start with an
declaration, all tal/metal namespaces must be explicitly defined using
xmlns:tal=url-that-nobody-can-remember). The HTML mode allows you to
write Javascript just like you would do it in a browser, with no extra
XML-quoting:
Does this not work for you? I'm currently looking at a Zope3 app that
does precisely this in its working page templates.
> I need to insert a