Explorar o código

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

Amauri CHAMPEAUX %!s(int64=10) %!d(string=hai) anos
pai
achega
56bad3f84d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      tarteaucitron.js

+ 1 - 1
tarteaucitron.js

@@ -691,7 +691,7 @@ var tarteaucitron = {
                     childId = id + Math.floor(Math.random() * 99999999999);
                     document.getElementById(id).innerHTML += '<div id="' + childId + '"></div>';
                     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);
                 }
             }