myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Commented] (MYFACES-3854) oam-compress-spaces don't remove spaces in CDATA sections
Date Thu, 13 Feb 2014 23:16:23 GMT

    [ https://issues.apache.org/jira/browse/MYFACES-3854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13900864#comment-13900864
] 

Leonardo Uribe commented on MYFACES-3854:
-----------------------------------------

After some attempts, I have found that the problem happens only if there are extra spaces
to the right side of the //<![CDATA[. It looks like we have a new case not contemplated
in the compression algorithm. CDATA sections are not interpreted as text, but as xml instruction.
But the problem looks more related to the way how \r\n case is handled. 

> oam-compress-spaces don't remove spaces in CDATA sections
> ---------------------------------------------------------
>
>                 Key: MYFACES-3854
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3854
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.1.14
>         Environment: Linux, tomcat 7
>            Reporter: James G
>
> When the "oam-compress-spaces" option removes spaces in a CDATA section it can cause
problems with the generated code.  For example, I sometimes do:
> <script type="text/javascript">
> //<![CDATA[
> someJavascript();
> //]]>
> </script>
> If there happens to be a space after //<![CDATA[, then it comes out:
> <script type="text/javascript">
> //<![CDATA[ someJavascript();
> //]]></script>
> so someJavascript() is not called by the browser.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message