On Thu, Dec 22, 2005 at 01:15:24PM -0400, Paul Childs wrote: > I am also looking for an answer to the Javascript question posed in this > post... > > http://sourceforge.net/mailarchive/forum.php?thread_id=9189385&forum_id=43670 > > specifically... > 2) It seems that Javascript embedded in the page gets escaped, even if it is > inside a CDATA block > - which means that for instance "<" becomes < > and this breaks the javascript interpretation .... > > I then followed the thread on ticket 99... > > http://lesscode.org/projects/kid/ticket/99 > It doesn't seem to be resolved. The last poster seems to think it > doesn't need to be resolved (if I read it right) > > Could someone please explain the proper way to get my Javascript to render.
I'll start off by saying that I personally prefer to have almost all JavaScript and CSS in separate files. The only JS I put in the HTML page is variables that are set dynamically by my applications. The JS in .js files can then read those variables. But that is probably not what you want to hear. You should be serializing you template as html and not xhtml. Since browsers really don't support XHTML yet this should not be a problem. From Fredrik's post to that ticket I gather that browsers that do support XHTML will behave properly which < in a script tag. David -- GPG keyID #6272EDAF on http://pgp.mit.edu Key fingerprint = 8BAA 7E11 8856 E148 6833 655A 92E2 3E00 6272 EDAF
pgp2laLLR3in9.pgp
Description: PGP signature