mirror of
https://github.com/jquery/jquery.git
synced 2026-02-09 01:45:13 -05:00
Change check for skipping the initial quickExpr RegExp check. Fixes #8984.
This commit is contained in:
@@ -96,9 +96,10 @@ jQuery.fn = jQuery.prototype = {
|
||||
// Handle HTML strings
|
||||
if ( typeof selector === "string" ) {
|
||||
// Are we dealing with HTML string or an ID?
|
||||
if ( selector.length > 1024 ) {
|
||||
// Assume very large strings are HTML and skip the regex check
|
||||
if ( selector.charAt(0) === "<" || selector.charAt( selector.length - 1 ) === ">" ) {
|
||||
// Assume that strings that start and end with <> are HTML and skip the regex check
|
||||
match = [ null, selector, null ];
|
||||
|
||||
} else {
|
||||
match = quickExpr.exec( selector );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user