You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org> on 2010/04/13 20:26:50 UTC
[jira] Commented: (MYFACES-2657) Already escaped apostrophes are
double-escaped while building the ClientBehavior JavaScript
[ https://issues.apache.org/jira/browse/MYFACES-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856539#action_12856539 ]
Jakob Korherr commented on MYFACES-2657:
----------------------------------------
The committed code makes things like this work:
onchange="var test = 'a\'b'; alert(test);"
> Already escaped apostrophes are double-escaped while building the ClientBehavior JavaScript
> -------------------------------------------------------------------------------------------
>
> Key: MYFACES-2657
> URL: https://issues.apache.org/jira/browse/MYFACES-2657
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 2.0.0-beta-3
> Reporter: Jakob Korherr
> Assignee: Jakob Korherr
>
> Currently we do StringUtils.replace(userEventCode, '\'', "\\'"); for escaping purposes, but this breaks when apostrophes in JavaScript code are already escaped, because they get double-escaped.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira