[Zope3-dev] Page Template Bug??

Darryl Cousins darryl at darrylcousins.net.nz
Wed Aug 8 05:21:17 EDT 2007


On Tue, 2007-08-07 at 22:30 -0400, Fred Drake wrote:
> On 8/7/07, Darryl Cousins <darryl at darrylcousins.net.nz> wrote:
> > Perhaps try breaking the string:
> >
> >         var tpl = "<" + "div> js-template <" + "/div>"
> >
> > Or something like that. Probably zpt doesn't know about tags within
> > javascript strings.
> ZPT follows the letter of the law quite strictly in this, since
> there's no way to win when applying hueristics to "do the right
> thing."  That'll always bite you in the long run, so we decided it's
> better to bite up front so problems are detected as early as possible,
> and the result is as usable as possible, without having to guess.  It
> can be annoying, but you see what you're getting right away.

JavaScript I think does much the same in this situation - that is, IIRC
it is necessary to break up var x = "<"+"script>" ... so as to avoid
confusion in the chips. Which is why I offered up what I did as a
potential solution.

I think zpt does a great job well.

> > Disclaimer: I've never used ExtJS.
> This is not specific to ExtJS.

I wasn't sure what was going on with the snippet of code from Luis, and
so my ``solution`` was perhaps useless. :-) Hence the disclaimer.

Sincere regards,

>   -Fred

More information about the Zope3-dev mailing list