Test case for jQuery Ticket 7796

attr selector with spaces

by jitter

HTML

<script src="http://getfirebug.com/firebug-lite-debug.js"></script>
<form>
    <p><input name="/test/test1" type="text" /></p>
</form>

JavaScript

var nameVal = '/test/test1',
    qSAnameVal = '\\/test\\/test1';

if( document.querySelectorAll ) {
    console.log( "Did qSA find the input: ", !!document.querySelectorAll("input[name=" + qSAnameVal + " ]" ).length  );
}
console.log( "Did jQuery find the input: ", !!$("input[name=" + nameVal + " ]").length );