aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/manipulation.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/manipulation.js b/src/manipulation.js
index f37ec421a..2cc6d8e20 100644
--- a/src/manipulation.js
+++ b/src/manipulation.js
@@ -485,8 +485,7 @@ function manipulationTarget( elem, content ) {
// Replace/restore the type attribute of script elements for safe DOM manipulation
function disableScript( elem ) {
- var attr = elem.getAttributeNode("type");
- elem.type = ( attr && attr.specified ) + "/" + elem.type;
+ elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
return elem;
}
function restoreScript( elem ) {