X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fselector%2Fselector.js;h=2cf0b640417b03fa2cb5535a3a6379afdb589fb9;hb=bdf05d890fe3a8cc085b2b4f13881ca043943e44;hp=7011db382fbb296c9475d78f87a26bb543b6724f;hpb=6f064fc9c527a46b4de16f0af310b98d1a87b0f4;p=jquery.git diff --git a/src/selector/selector.js b/src/selector/selector.js index 7011db3..2cf0b64 100644 --- a/src/selector/selector.js +++ b/src/selector/selector.js @@ -63,7 +63,7 @@ jQuery.extend({ // Match: :even, :last-chlid, #id, .class new RegExp("^([:.#]*)(" + - ( jQuery.chars = jQuery.browser.safari && jQuery.browser.version < "3.0.0" ? "\\w" : "(?:[\\w\u0128-\uFFFF*_-]|\\\\.)" ) + "+)") + ( jQuery.chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ? "(?:[\\w*_-]|\\\\.)" : "(?:[\\w\u0128-\uFFFF*_-]|\\\\.)" ) + "+)") ], multiFilter: function( expr, elems, not ) { @@ -99,7 +99,7 @@ jQuery.extend({ // Handle the common XPath // expression if ( !t.indexOf("//") ) { - context = context.documentElement; + //context = context.documentElement; t = t.substr(2,t.length); // And the / root expression @@ -142,7 +142,7 @@ jQuery.extend({ if ( t.indexOf(" ") == 0 ) continue; foundToken = true; } else { - re = /^((\/?\.\.)|([>\/+~]))\s*([a-z]*)/i; + re = /^((\/?\.\.)|([>\/+~]))\s*(\w*)/i; if ( (m = re.exec(t)) != null ) { r = []; @@ -193,7 +193,7 @@ jQuery.extend({ t = " " + t.substr(1,t.length); } else { - // Optomize for the case nodeName#idName + // Optimize for the case nodeName#idName var re2 = new RegExp("^(" + jQuery.chars + "+)(#)(" + jQuery.chars + "+)"); var m = re2.exec(t);