Modify ↓
Ticket #7539 (closed bug: duplicate)
Attribute selector equals with escaped value fails in IE8
| Reported by: | dennis@… | Owned by: | john |
|---|---|---|---|
| Priority: | blocker | Milestone: | 1.5 |
| Component: | selector | Version: | 1.4.4 |
| Keywords: | Cc: | rwaldron | |
| Blocking: | Blocked by: |
Description
Having:
<input name="foo[bar]" type="text" />
the following:
alert($("[name=foo\\[bar\\]]").length);
alerts 0 in IE8 together with jQuery v1.4.4, while it alerted 1 correctly with v1.4.3.
This causes serious problems when operating on form elements with array-styled names.
Change History
comment:1 Changed 3 years ago by rwaldron
- Status changed from new to closed
- Resolution set to invalid
comment:2 Changed 3 years ago by jitter
- Status changed from closed to reopened
- Resolution invalid deleted
comment:3 Changed 3 years ago by jitter
- Priority changed from undecided to blocker
- Status changed from reopened to open
- Component changed from unfiled to selector
As per discussion with csnover. The escaped but unquoted selector needs to work as it's valid CSS3 selector syntax and also is correctly handled by qSA. There is no good reason for this selector suddenly failing since jQuery 1.4.4,
comment:10 Changed 2 years ago by jitter
#7813 is a duplicate of this ticket.
comment:15 Changed 2 years ago by john
- Status changed from assigned to closed
- Resolution set to duplicate
comment:16 Changed 2 years ago by john
Duplicate of #6093.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Escaped or not, attributes MUST be quoted
http://jsfiddle.net/rwaldron/mrtCs/