myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From we...@apache.org
Subject svn commit: r956486 - /myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js
Date Mon, 21 Jun 2010 08:07:04 GMT
Author: werpu
Date: Mon Jun 21 08:07:04 2010
New Revision: 956486

URL: http://svn.apache.org/viewvc?rev=956486&view=rev
Log:
http://issues.apache.org/jira/browse/MYFACES-2765

fixed : character issue in id and name searches

Modified:
    myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js

Modified: myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js?rev=956486&r1=956485&r2=956486&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js
(original)
+++ myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js
Mon Jun 21 08:07:04 2010
@@ -284,7 +284,7 @@ myfaces._impl.core._Runtime.singletonExt
             //we can use the query selector here
             if (fragment.id && fragment.id === itemId) return fragment;
             if (myfaces._impl._util._Lang.isString(itemId)) {
-                itemId = itemId.replace(/\./g, "\\.");
+                itemId = itemId.replace(/\./g, "\\.").replace(/:/g, "\\:");
             }
 
             return fragment.querySelector("#" + itemId);
@@ -429,7 +429,7 @@ myfaces._impl.core._Runtime.singletonExt
 
             if (deepScan && fragment.querySelectorAll) {
                 if (_Lang.isString(name)) {
-                    name = name.replace(/\./g, "\\.");
+                    name = name.replace(/\./g, "\\.").replace(/:/g, "\\:");;
                 }
                 var result = fragment.querySelectorAll("[name=" + name + "]");
                 if (fragment.nodeType == 1 && filter(fragment)) {



Mime
View raw message