Selector: add jQuery.escapeSelector

Fixes gh-1761
Close gh-2878
This commit is contained in:
Timmy Willison
2016-01-27 12:57:04 -05:00
parent a8c0194d3d
commit 25068bf2c6
3 changed files with 34 additions and 3 deletions

View File

@@ -536,3 +536,9 @@ QUnit.asyncTest( "Iframe dispatch should not affect jQuery (#13936)", 1, functio
iframeDoc.write( "<body><form id='navigate' action='?'></form></body>" );
iframeDoc.close();
} );
QUnit.test( "Ensure escapeSelector exists (escape tests in Sizzle)", function( assert ) {
assert.expect( 1 );
assert.equal( jQuery.escapeSelector( "#foo.bar" ), "\\#foo\\.bar", "escapeSelector present" );
} );