@@ -221,8 +221,8 @@ QUnit.test( "broken selectors throw", function( assert ) {
221221 . appendTo ( "#qunit-fixture" ) ;
222222
223223 broken ( "Attribute equals non-value" , "input[name=]" ) ;
224- broken ( "Attribute equals unquoted non-identifer " , "input[name=foo.baz]" ) ;
225- broken ( "Attribute equals unquoted non-identifer " , "input[name=foo[baz]]" ) ;
224+ broken ( "Attribute equals unquoted non-identifier " , "input[name=foo.baz]" ) ;
225+ broken ( "Attribute equals unquoted non-identifier " , "input[name=foo[baz]]" ) ;
226226 broken ( "Attribute equals bad string" , "input[name=''double-quoted'']" ) ;
227227 broken ( "Attribute equals bad string" , "input[name='apostrophe'd']" ) ;
228228} ) ;
@@ -638,7 +638,7 @@ QUnit.test( "attributes - hyphen-prefix matches", function( assert ) {
638638} ) ;
639639
640640QUnit . test ( "attributes - special characters" , function ( assert ) {
641- assert . expect ( 14 ) ;
641+ assert . expect ( 16 ) ;
642642
643643 var attrbad ;
644644 var div = document . createElement ( "div" ) ;
@@ -656,6 +656,7 @@ QUnit.test( "attributes - special characters", function( assert ) {
656656 "<input type='hidden' id='attrbad_space' name='foo bar'/>" +
657657 "<input type='hidden' id='attrbad_dot' value='2' name='foo.baz'/>" +
658658 "<input type='hidden' id='attrbad_brackets' value='2' name='foo[baz]'/>" +
659+ "<input type='hidden' id='attrbad_leading_digits' name='agent' value='007'/>" +
659660 "<input type='hidden' id='attrbad_injection' data-attr='foo_baz']'/>" +
660661 "<input type='hidden' id='attrbad_quote' data-attr='''/>" +
661662 "<input type='hidden' id='attrbad_backslash' data-attr='\'/>" +
@@ -678,6 +679,13 @@ QUnit.test( "attributes - special characters", function( assert ) {
678679 q ( "attrbad_injection" ) ,
679680 "string containing quote and right bracket" ) ;
680681
682+ assert . deepEqual ( jQuery . find ( "input[value=\\30 \\30\\37 ]" , null , null , attrbad ) ,
683+ q ( "attrbad_leading_digits" ) ,
684+ "identifier containing escaped leading digits with whitespace termination" ) ;
685+ assert . deepEqual ( jQuery . find ( "input[value=\\00003007]" , null , null , attrbad ) ,
686+ q ( "attrbad_leading_digits" ) ,
687+ "identifier containing escaped leading digits without whitespace termination" ) ;
688+
681689 assert . deepEqual ( jQuery . find ( "input[data-attr='\\'']" , null , null , attrbad ) ,
682690 q ( "attrbad_quote" ) ,
683691 "string containing quote" ) ;
0 commit comments