You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Michael Heinen <mh...@googlemail.com> on 2012/06/01 09:08:45 UTC

Re: Generated script not well-formed

Hi Martin,

see also https://issues.apache.org/jira/browse/TOMAHAWK-722

I patched the class locally and added into method 
renderFormSubmitScriptIfNecessary element two lines inside the script 
element:

writer.write("//<![CDATA[ \n");
...
writer.write("\n////]]>");

I'll try to attach this patch soon.

Michael

Am 31.05.2012 20:54, schrieb M. Huber:
> Hi!
>
> I am using MyFaces Tomahawk 1.1.15 on Mojarra JSF 1.2 Impl
> with XHTML-based JSF pages. Tomahawk renders source code like
>
> <script type="text/javascript">
> function getScrolling()
> ...&&...
> }</script>
>
> which is not valid XML because the "&&" is not XML-escaped.
> I think it should be something like
>
> <script type="text/javascript">//<![CDATA[
> function getScrolling()...&&...}
> //]]></script>
>
> The responsible Java class seems to be
> org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlRendererUtils
>
> How can I change the behavior of this class to render XML
> compliant script code (without loosing the nice
> org.apache.myfaces.AUTO_SCROLL feature)?
>
> Thanks
>
> Martin