On 2010-10-12 19:40, Paul Everitt wrote: > > Hi all. Before this floats out of my brain, I thought I'd write it down and > see what people think. > > In the past few months I've done a bit of client-side templating in jQuery, > first using John Resig's microtemplating: > > http://ejohn.org/blog/javascript-micro-templating/ > > ...as well as the just-announced-as-core templating: > > > http://blog.jquery.com/2010/10/04/new-official-jquery-plugins-provide-templating-data-linking-and-globalization/ > > I used these in KARL which uses Chameleon 1.1.1. All was happy. > > I tried both today on a new project which uses Chameleon 1.2.13. Chameleon > didn't like the syntax, which in one case looks like this: > > <% some expression %> > > ....and in another: > > ${somevar} > > In the first case, Chameleon refuses to parse the zpt because Expat tries to > interpret<% as a startTag. In the second case...needless to say, it is > ironic that we have overlap in syntax. I then tried wrapping a CDATA around > the block, but Chameleon happily plowed into the CDATA looking for stuff to > evaluate.
You can locally disable ${..} interpolation in chameleon: <script type="text/javascript" meta:interpolation="false"> ... </script> I use that all the time to prevent problems with $variable names in javascript. Wichert. -- Wichert Akkerman <wich...@wiggy.net> It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. _______________________________________________ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev