myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jak...@apache.org
Subject svn commit: r933702 - /myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java
Date Tue, 13 Apr 2010 16:31:22 GMT
Author: jakobk
Date: Tue Apr 13 16:31:22 2010
New Revision: 933702

URL: http://svn.apache.org/viewvc?rev=933702&view=rev
Log:
MYFACES-2650 chaining ajax onchange with existing onchange creates syntax error

Modified:
    myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java

Modified: myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java?rev=933702&r1=933701&r2=933702&view=diff
==============================================================================
--- myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java
(original)
+++ myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java
Tue Apr 13 16:31:22 2010
@@ -2179,7 +2179,11 @@ public final class HtmlRendererUtils {
         List<String> finalParams = new ArrayList<String>(3);
         if (userEventCode != null && !userEventCode.trim().equals(STR_EMPTY))
         {
-            finalParams.add('\''+userEventCode+'\'');
+            // escape every ' in the user event code since it will
+            // be a string attribute of jsf.util.chain
+            userEventCode = StringUtils.replace(userEventCode, '\'', "\\'");
+            
+            finalParams.add('\'' + userEventCode + '\'');
         }
 
         final MyfacesConfig currentInstance = MyfacesConfig



Mime
View raw message