>for (var i = 0; i < foo.length; i++ ) {
>
>
for (var i = 0; i < foo.length; i++ ) {
We really should put this somewhere more prominent in the docs!
Paul
+1 on that, took me ages to notice I could do that. When we do, we
should also put in a note that the same thing is required in python
statements. ( At least it is in kid! )
ie
<div py:if="foo < bar">
Iain
>Well, that keeps the template from blowing up, but it passes the <
>right through. So I end up with
>for (var i = 0; i < foo.length; i++)
>And (understandably), the javascript interpreter has a leeeetle
>problem with that.
>
>
Ah, you're right. Sorry, giving out duff advice here. Looking back, I
realise I've only done this before in Genshi py:for blocks, not in JS.
Well, the quick hack is to use >= instead, and swap the operands. Some
other ideas:
Put this in a static .js file
I wonder if Genshi has an equivalent to XSLT's disable-output-escaping?
Someone mentioned CDATA.
Good luck,
Paul
The advice was sound. The problem is that escaping of html entities in
HTML only works for XHTML - otherwise, the browser will be in some mixed
parsing mode.
Unfortunately, the reliance of genshi/KID on pure XML even if they
_produce_ HTML will not allow for an easy solution. Except for switching
to 100% XHTML of course.
Diez