[ 
https://issues.apache.org/jira/browse/TOMAHAWK-722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12712282#action_12712282
 ] 

Ramiro Pereira de Magalhães commented on TOMAHAWK-722:
------------------------------------------------------

Wouldn't it be solved if someone changed method "prepareScript" on class 
HtmlRendererUtils 
(http://svn.apache.org/viewvc/myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java?revision=613572&pathrev=613572)
 so that it wrote those CDATA scapes after and before the whole script?

> 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.

Reply via email to