Commit 3ef7a968 authored by Timmy Willison's avatar Timmy Willison

Remove unnecessary usage of getAttributeNode(). Fixes #12072.

parent 9d16fe62
...@@ -485,8 +485,7 @@ function manipulationTarget( elem, content ) { ...@@ -485,8 +485,7 @@ function manipulationTarget( elem, content ) {
// Replace/restore the type attribute of script elements for safe DOM manipulation // Replace/restore the type attribute of script elements for safe DOM manipulation
function disableScript( elem ) { function disableScript( elem ) {
var attr = elem.getAttributeNode("type"); elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
elem.type = ( attr && attr.specified ) + "/" + elem.type;
return elem; return elem;
} }
function restoreScript( elem ) { function restoreScript( elem ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment