Same thing happens in Genshi, I have to put all javascript in comments... <script> <!-- ...js code... --> </script>
On Thu, Mar 3, 2011 at 2:25 PM, soulcheck <[email protected]>wrote: > Ok i tried the example on w3c valitador with doctype set to xhtml > transitional, and it returned error, so it's normal in xhtml. I should > have checked that earlier. > > Thanks for help > > On Mar 3, 9:22 pm, soulcheck <[email protected]> wrote: > > Yeah, moving it to standalone script works and that's what I'm going > > to do (or escabe it with CDATA, wich works too), but I was curious if > > it's not just a matter of turning off validation or some other > > option. > > > > On Mar 3, 9:05 pm, Chris McDonough <[email protected]> wrote: > > > > > > > > > > > > > > > > > I wish I knew the answer to this, but I don't. This is really an XML > > > thing rather than a Chameleon thing. You might try using the numeric > > > entity equivalent of &, other than that I might just move it to a > > > standalone script and be done with it. > > > > > On Thu, 2011-03-03 at 11:36 -0800, soulcheck wrote: > > > > Hello! > > > > > > I'm not sure if this is the right place to ask, but I'll try anyway > :) > > > > > > I'm trying to embed some code between <script> </script> tags, > pyramid > > > > however doesn't like it and gives me > > > > > > ExpatError: not well-formed (invalid token) > > > > > > Probably because i have && in my code. I tried using & instead, > > > > but then it didn't get interpreted in the browser. > > > > > > The same thing happens when i try to put it in CDATA block. > > > > > > When I move the code to a separate js file it works. I'd like to keep > > > > it in the same file for now, just to enable quick corrections. > > > > > > So, how should I do it? > > > > > > EDIT: > > > > > > I get the same error even for templates as simple as this one: > > > > > > <html > > > > xmlns:tal="http://xml.zope.org/namespaces/tal" > > > > xmlns:metal="http://xml.zope.org/namespaces/metal"> > > > > <head> > > > > </head> > > > > <body> > > > > <span onclick="alert(true && false);">test</span> > > > > </body> > > > > </html> > > -- > You received this message because you are subscribed to the Google Groups > "pylons-discuss" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/pylons-discuss?hl=en. > > -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
