Opened 13 years ago
Closed 13 years ago
#5503 closed bug (worksforme)
Selector against name fails if name contains period followed by square brackets
Reported by: | jonliss | Owned by: | john |
---|---|---|---|
Priority: | major | Milestone: | 1.4 |
Component: | selector | Version: | 1.3.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
JQuery 1.3.2 fails if the name used in a selector contains a period followed by square brackets. Either on their own work as expected.
e.g.
$('input[name="foo[0]"]:checked').val() works. $('input[name="fee.foe"]:checked').val() works. $('input[name="bar.baz[0]"]:checked').val() fails.
Attached is a test html file illustrating failure, requires jquery-1.3.2.min.js in same directory.
Tested against Firefox 3.0.15 and IE 6.0.2900 with the same failing results.
Attachments (1)
Change History (2)
Changed 13 years ago by
comment:1 Changed 13 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
For correct cross-browser operation, you must escape any special chars in the name. The W3C says that names can contain only alphanumeric chars, but jQuery allows them in selectors as long as they are escaped with
per the docs.
test case illustrates failure