瀏覽代碼

Fix the detection of script tag in case of not type specified

Amauri CHAMPEAUX 10 年之前
父節點
當前提交
56bad3f84d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tarteaucitron.js

+ 1 - 1
tarteaucitron.js

@@ -691,7 +691,7 @@ var tarteaucitron = {
                     childId = id + Math.floor(Math.random() * 99999999999);
                     childId = id + Math.floor(Math.random() * 99999999999);
                     document.getElementById(id).innerHTML += '<div id="' + childId + '"></div>';
                     document.getElementById(id).innerHTML += '<div id="' + childId + '"></div>';
                     tarteaucitron.makeAsync.getAndParse(scripts[i].getAttribute('src'), childId);
                     tarteaucitron.makeAsync.getAndParse(scripts[i].getAttribute('src'), childId);
-                } else if (type.indexOf('javascript') !== -1) {
+                } else if (type.indexOf('javascript') !== -1 || type === '') {
                     eval(scripts[i].innerHTML);
                     eval(scripts[i].innerHTML);
                 }
                 }
             }
             }