Skip to content
Permalink
Browse files
#6782 - optimized regex to allow more html snippets to user innerHTML
  • Loading branch information
cmcnulty committed Feb 25, 2011
1 parent 71bd828 commit 00a05ad
Showing 1 changed file with 2 additions and 1 deletion.
@@ -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() ] ) {

0 comments on commit 00a05ad

Please sign in to comment.