diff options
author | cmcnulty <cmcnulty@kznf.com> | 2011-02-25 11:40:05 -0800 |
---|---|---|
committer | cmcnulty <cmcnulty@kznf.com> | 2011-02-25 11:40:05 -0800 |
commit | 00a05ad98513d037d1fde190626ec75dd9326f9e (patch) | |
tree | f6ff809dac7ba0b29fe400c978bd8496dc5c5660 /src/manipulation.js | |
parent | 71bd828d9f975fb1047b9fa2a78949cafd8006ac (diff) | |
download | jquery-00a05ad98513d037d1fde190626ec75dd9326f9e.tar.gz jquery-00a05ad98513d037d1fde190626ec75dd9326f9e.zip |
#6782 - optimized regex to allow more html snippets to user innerHTML
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 ba3169715..9da9b6fac 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, @@ -199,7 +200,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() ] ) { |