You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Nick Belaevski (JIRA)" <de...@myfaces.apache.org> on 2010/12/23 00:01:06 UTC

[jira] Created: (MYFACES-3007) HtmlRendererUtils: incorrect handling of JavaScript code containing quote (' " ') symbol

HtmlRendererUtils: incorrect handling of JavaScript code containing quote (' " ') symbol
----------------------------------------------------------------------------------------

                 Key: MYFACES-3007
                 URL: https://issues.apache.org/jira/browse/MYFACES-3007
             Project: MyFaces Core
          Issue Type: Bug
          Components: JSR-314
    Affects Versions: 2.0.3
            Reporter: Nick Belaevski


Compare behavior of the following code in Mojarra & MyFaces:


			<h:commandLink onclick="var foo = &quot; \&quot; test &quot;; alert(foo);">
				Test
				<f:ajax />
			</h:commandLink>

In Mojarra alert(...) is called, in MyFaces script error occurs

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (MYFACES-3007) HtmlRendererUtils: incorrect handling of JavaScript code containing quote (' " ') symbol

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-3007?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe resolved MYFACES-3007.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.4-SNAPSHOT
         Assignee: Leonardo Uribe

Yes, it seems the rule applies for \ and ' characters. The solution is just add an additional \ each time it found \ or '.

> HtmlRendererUtils: incorrect handling of JavaScript code containing quote (' " ') symbol
> ----------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3007
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3007
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.3
>            Reporter: Nick Belaevski
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.4-SNAPSHOT
>
>
> Compare behavior of the following code in Mojarra & MyFaces:
> 			<h:commandLink onclick="var foo = &quot; \&quot; test &quot;; alert(foo);">
> 				Test
> 				<f:ajax />
> 			</h:commandLink>
> In Mojarra alert(...) is called, in MyFaces script error occurs

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.