diff options
author | Dave Methvin <dave.methvin@gmail.com> | 2011-09-21 23:05:26 -0400 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2011-09-21 23:05:26 -0400 |
commit | d638aa9c6d6394db0c06431560b3d8b83cacc61c (patch) | |
tree | 95d9817d17be43e69c51186b127371c15952fd43 /src/manipulation.js | |
parent | a4cdbf09ee97471ec041d83ceb8f3feb9825b2a1 (diff) | |
parent | 2746d7f29976462499fa98181986f47c75258c94 (diff) | |
download | jquery-d638aa9c6d6394db0c06431560b3d8b83cacc61c.tar.gz jquery-d638aa9c6d6394db0c06431560b3d8b83cacc61c.zip |
Allow more cases to use `innerHTML` in the `.html` method.
Thanks @cmcnulty for the pull and the patience!
Diffstat (limited to 'src/manipulation.js')
-rw-r--r-- | src/manipulation.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/manipulation.js b/src/manipulation.js index bc2af18dc..8b0af08a9 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -6,6 +6,7 @@ var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, rtagName = /<([\w:]+)/, rtbody = /<tbody/i, rhtml = /<|&#?\w+;/, + rnoInnerhtml = /<(?:script|style)/i, rnocache = /<(?:script|object|embed|option|style)/i, // checked="checked" or checked rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, @@ -217,7 +218,7 @@ jQuery.fn.extend({ null; // See if we can take a shortcut and just use innerHTML - } else if ( typeof value === "string" && !rnocache.test( value ) && + } else if ( typeof value === "string" && !rnoInnerhtml.test( value ) && (jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) && !wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) { |