From: Timmy Willison Date: Thu, 18 Apr 2013 17:43:51 +0000 (-0400) Subject: Remove unnecessary usage of getAttributeNode(). Fixes #12072. X-Git-Tag: 2.0.0~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3ef7a9683b95fa334ab75458a531bb263782c748;p=jquery.git Remove unnecessary usage of getAttributeNode(). Fixes #12072. --- 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 ) {