jquery core: closes #3034. Ids with '-' weren't handled by quickExpr.
authorAriel Flesler <aflesler@gmail.com>
Fri, 13 Jun 2008 18:42:54 +0000 (18:42 +0000)
committerAriel Flesler <aflesler@gmail.com>
Fri, 13 Jun 2008 18:42:54 +0000 (18:42 +0000)
src/core.js

index 5e1f0b0..c90f58d 100644 (file)
@@ -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 = /^.[^:#\[\.]*$/,