[
https://issues.apache.org/jira/browse/TOMAHAWK-722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564726#action_12564726
]
Michael Heinen commented on TOMAHAWK-722:
-----------------------------------------
The cdata section around the script tags is also required for ajax responses
which should be xml compliant.
If I use the NEKO parser instead of the strict TIDY parser then javascript
statements like (a && b) are evil and result in an error.
> Javascript in Tomahawk components produces invalid markup when output as
> application/xhtml + xml with 1.2 RI
> -------------------------------------------------------------------------------------------------------------
>
> Key: TOMAHAWK-722
> URL: https://issues.apache.org/jira/browse/TOMAHAWK-722
> Project: MyFaces Tomahawk
> Issue Type: Bug
> Affects Versions: 1.1.4-SNAPSHOT
> Environment: JSF 1.2_02 RI, JBoss 4.0.4 (tomcat 5.5), facelets
> Reporter: reind
>
> The JSF 1.2 RI will output to Content-Type application/xhtml+xml instead of
> text/html when a page is viewed with Firefox. Tomahawk components do not
> properly escape the Javascript when they're rendered as application/xhtml+xml
> and so they produce invalid markup and the pages are not displayed in Firefox.
> The fix is to enclose any javascript in CDATA elements like the following:
> <script>
> <![CDATA[
> ... script content here ...
> -- ]]>
> </script>
> This was not a problem in the JSF 1.1 RI or MyFaces because they always
> output to text/html.
> Ref:
> 1. http://www.codehouse.com/javascript/tips/xhtml/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.