diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/init.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/init.js b/src/core/init.js index 9beaedd04..9357e05a3 100644 --- a/src/core/init.js +++ b/src/core/init.js @@ -11,7 +11,8 @@ var rootjQuery, // A simple way to check for HTML strings // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) // Strict HTML recognition (#11290: must start with <) - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, + // Shortcut simple #id case for speed + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, init = jQuery.fn.init = function( selector, context ) { var match, elem; |