diff --git a/src/core.js b/src/core.js index 3f6c1f75..3a9eaa7d 100644 --- a/src/core.js +++ b/src/core.js @@ -855,7 +855,7 @@ jQuery.extend({ }); // Trim whitespace, otherwise indexOf won't work as expected - var tags = jQuery.trim( elem ).toLowerCase(); + var tags = elem.replace(/^\s+/, "").substring(0, 10).toLowerCase(); var wrap = // option or optgroup @@ -895,11 +895,12 @@ jQuery.extend({ if ( !jQuery.support.tbody ) { // String was a , *may* have spurious - var tbody = !tags.indexOf(" or - wrap[1] == "
" && tags.indexOf("" && !hasBody ? div.childNodes : [];