From 2f2602ed15b4bac1274d210348d63931a6fdf39e Mon Sep 17 00:00:00 2001 From: Ariel Flesler Date: Fri, 13 Jun 2008 18:42:54 +0000 Subject: [PATCH] jquery core: closes #3034. Ids with '-' weren't handled by quickExpr. --- src/core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core.js b/src/core.js index 5e1f0b051..c90f58d80 100644 --- a/src/core.js +++ b/src/core.js @@ -21,7 +21,7 @@ var jQuery = window.jQuery = window.$ = function( selector, context ) { // A simple way to check for HTML strings or ID strings // (both of which we optimize for) -var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/, +var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/, // Is it a simple selector isSimple = /^.[^:#\[\.]*$/,