Selector in JQuery works without closing brackets
jquery
Solution
If you check sizzle.js code on github. At Line 856 you have this treatment for attributes quotes on selectors:
// Make sure that attribute selectors are quoted
expr = expr.replace( rattributeQuotes, "='$1']" );
Which will in fact replace this `[name=test1` with this `[name='test1']`
Problem
Does anyone know why does this selector work fine without closing brackets? ``` $("div[name=test1") ``` And gives the same result as this: ``` $("div[name=test1]") ``` HTML: ``` <div name="test1"> Content Test 1</div> ``` Fiddle