Opened 11 years ago

Closed 7 years ago

Last modified 7 years ago

#6834 closed defect (fixed)

Square brackets handled improperly in dojo attribute queries

Reported by: guest Owned by:
Priority: low Milestone: 1.3
Component: Query Version: 1.1.1
Keywords: query attribute Cc:
Blocked By: Blocking:


Browser: Firefox OS: Mac OS X 10.5.2

I was unable to find any mention of this elsewhere, so I have to assume it's a bug. I apologize if it's already been addressed and I'm wasting someone's time.

I have a bunch of checkboxes (with dojoType="dijit.form.CheckBox?") all named 'unitType[]' (the square brackets at the end cause PHP to treat the collection of them as one array). I've tried doing the following queries for them:

var foo = dojo.query("input[name='unitType[]']");
var foo = dojo.query("input[name='unitType\[\]']");
var foo = dojo.query("input[name='unitType']");

None of these find the checkboxes. I am positive these elements exist, with the name unitType[], and I tried it with a few other square-bracket-names with the same result.

I believe the problem is related to it incorrectly parsing square brackets. When I did each of the following queries:


It finds them, as well as the checkbox named "unitTypeCkAll" (which it shouldn't find, because 'unitTypeCkAll' does not start with 'unitType[]'). This sounds to me like it's ignoring the square brackets entirely.

Change History (4)

comment:1 Changed 11 years ago by dylan

Milestone: future

comment:2 Changed 8 years ago by Chris Mitchell

Owner: anonymous deleted

comment:3 Changed 7 years ago by ben hockey

Milestone: future1.3
Priority: highlow
Resolution: fixed
Status: newclosed

fixed sometime before 1.3 -

comment:4 Changed 7 years ago by bill

Component: CoreQuery
Note: See TracTickets for help on using tickets.