diff options
author | Oleg Gaidarenko <markelog@gmail.com> | 2015-12-22 17:52:22 +0300 |
---|---|---|
committer | Oleg Gaidarenko <markelog@gmail.com> | 2015-12-22 17:52:22 +0300 |
commit | fd5858f5423968aed8329f2cc0e5e590a7e05621 (patch) | |
tree | d66a17be50822a511d2ea5d59874922e0f21c3b7 /src/core/init.js | |
parent | 9f2dcb93f848a698602cb7cde1128e7e6907d9cc (diff) | |
download | jquery-fd5858f5423968aed8329f2cc0e5e590a7e05621.tar.gz jquery-fd5858f5423968aed8329f2cc0e5e590a7e05621.zip |
Revert "Core: Throw an error on $("#") rather than returning 0-length collection"
This reverts commit 93f95c966355f02b5695f50523f88687eadb4c81.
Diffstat (limited to 'src/core/init.js')
-rw-r--r-- | src/core/init.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/init.js b/src/core/init.js index 5ce89e8a1..0c4ca4552 100644 --- a/src/core/init.js +++ b/src/core/init.js @@ -12,8 +12,7 @@ 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 <) - // Shortcut simple #id case for speed - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, init = jQuery.fn.init = function( selector, context, root ) { var match, elem; |