myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From we...@apache.org
Subject svn commit: r1406527 - /myfaces/core/trunk/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js
Date Wed, 07 Nov 2012 10:34:54 GMT
Author: werpu
Date: Wed Nov  7 10:34:53 2012
New Revision: 1406527

URL: http://svn.apache.org/viewvc?rev=1406527&view=rev
Log:
MYFACES-3637 fixed the script eval now only valid java/ecmascript tags are evaled

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=1406527&r1=1406526&r2=1406527&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
Wed Nov  7 10:34:53 2012
@@ -122,7 +122,12 @@ _MF_SINGLTN(_PFX_UTIL + "_Dom", Object, 
             finalScripts = [],
             execScrpt = function(item) {
                 var tagName = item.tagName;
-                if (tagName && _Lang.equalsIgnoreCase(tagName, "script")) {
+                var itemType = item.type || "";
+                if(tagName && _Lang.equalsIgnoreCase(tagName, "script") &&
+                        (itemType === "" || _Lang.equalsIgnoreCase(itemType,"text/javascript")
||
+                         _Lang.equalsIgnoreCase(itemType,"javascript") ||
+                         _Lang.equalsIgnoreCase(itemType,"text/ecmascript") ||
+                         _Lang.equalsIgnoreCase(itemType,"ecmascript"))) {
                     var src = item.getAttribute('src');
                     if ('undefined' != typeof src
                             && null != src



Mime
View raw message