Bug Tracker

Ticket #3630: lower_unicode_characters.diff

File lower_unicode_characters.diff, 1.5 KB (added by choan, 13 years ago)

Patch to support #áéíóú selectors

  • test/unit/selector.js

     
    4141});
    4242
    4343test("id", function() {
    44         expect(25);
     44        expect(26);
    4545        t( "ID Selector", "#body", ["body"] );
    4646        t( "ID Selector w/ Element", "body#body", ["body"] );
    4747        t( "ID Selector w/ Element", "ul#first", [] );
    4848        t( "ID selector with existing ID descendant", "#firstp #simon1", ["simon1"] );
    4949        t( "ID selector with non-existant descendant", "#firstp #foobar", [] );
    5050        t( "ID selector using UTF8", "#台北Táiběi", ["台北Táiběi"] );
     51  t( "ID selector using lower UTF8 characters", "#aviación", ["aviación"] );
    5152        t( "Multiple ID selectors using UTF8", "#台北Táiběi, #台北", ["台北Táiběi","台北"] );
    5253        t( "Descendant ID selector using UTF8", "div #台北", ["台北"] );
    5354        t( "Child ID selector using UTF8", "form > #台北", ["台北"] );
  • src/selector.js

     
    11var chars = jQuery.browser.safari && parseInt(jQuery.browser.version) < 417 ?
    22                "(?:[\\w*_-]|\\\\.)" :
    3                 "(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",
     3                "(?:[\\w\u00c0-\uFFFF*_-]|\\\\.)",
    44        quickChild = new RegExp("^>\\s*(" + chars + "+)"),
    55        quickID = new RegExp("^(" + chars + "+)(#)(" + chars + "+)"),
    66        quickClass = new RegExp("^([#.]?)(" + chars + "*)");