jQuery 1.4.4 + meta characters in selectors = broken?
Until v1.4.4, I was able to use the following selector:
jQuery("input[type=checkbox][name='entry[id=>assignedToUsers][]']")
to select the following checkbox element:
<input type="checkbox" name="entry[id=>assignedToUsers][]">
This was clearly in violation of jQuery's selector requirements, but it worked.
I even tried encoding the > as >, but this introduces the ";" character into the selector.
The jQuery Documentation has the following note:
If you wish to use any of the meta-characters (
#;&,.+*~':"!^$[]()=>|/@
) as a literal part of a name, you must escape the character with two backslashes:
\\
. For example, if you have an an input with
name="names[]"
, you can use the selector
$("input[name=names\\[\\]]")
.
But escaping the meta-characters does not solve the problem for me in v1.4.4. Removing the "=" and ";" characters from the selector is the only solution that seems to avoid the issue.
Could this be a parsing bug in 1.4.4?