Hi Michael, Are you generating html or xhtml? And which JSF implementation/version are you running tomahawk on?
For html, a CDATA tag should not be needed, as <script> tags have special parsing rules in html. For xhtml, things like "&&" do indeed need to be escaped, and CDATA is best. This Jira issue says it is already handled by myfaces-core: https://issues.apache.org/jira/browse/TOMAHAWK-722 I am a little surprised, but that would be good. Just as a side-comment, I would prefer to wrap scripts in cdata (a) only for xhtml; for html it is not needed as the <script> tag has special parsing rules. (b) in xhtml, only when the script really contains something that needs escaping. The pages that myfaces generates are far too bloated already, and adding unnecessary text would be bad. Regards, Simon ---- Michael Heinen <[EMAIL PROTECTED]> schrieb: > The problem is the missing CDATA around the script tag content. > > > > TIDY HTML parser adds automatically following block: > > //<![CDATA[ ........ ////]]> > > > > Shouldn't this be standard if javascript is used inside? > > Otherwise it is only useable in ajax responses with very strict parsers > like TIDY. > > > > I think there were also some other threads in the past regarding the > missing CDATA statements. > > > > Michael > > > > > > From: Martin Marinschek [mailto:[EMAIL PROTECTED] > Sent: Freitag, 1. Februar 2008 00:10 > To: MyFaces Discussion > Subject: Re: [tomahawk] oamSubmitForm causes parse error > > > > No ideas, no patches. Is it the & which is not liked by the parser? > > regards, > > Martin > > On Thu, Jan 31, 2008 at 6:33 PM, Michael Heinen <[EMAIL PROTECTED]> > wrote: > > I am using myFaces in combination with ajax4jsf (or richfaces) and tried > to use the Nekko Parser (or Neko?) in the richfaces filter to achieve > better performance. > > Some tomahawk javascript code makes now trouble: > > > > The parser says: > > error[18:11:35,796]: Parse Error: XML Parsing Error: A name was started > with an invalid character.Location: > > Line Number 82, Column 36: > > if((typeof target!='undefined') && target != null) > > ------------------------------------^ > > > > This line is part of the function oamSubmitForm. > > > > Any ideas or patches available? > > > > > > My environment: > > myFaces 1.1.5 > > tomahawk snapshot 1.1.5 > > richfaces 3.1.4 >