Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#15319 closed defect (worksforme)

dojo/query fails to find elements with tilde (~) character in id

Reported by: chris2m Owned by: Kris Zyp
Priority: undecided Milestone: 1.7.5
Component: Query Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:

Description

dojo/query with selectorEngine=acme fails to find elements with id attributes that contain the tilde (~) character:

// query element with id=this~is~silly
query('#this~is~silly');

The above code snippet works correctly with sizzle. It is also worth noting that thanks to this change http://trac.dojotoolkit.org/ticket/10651 we can use the following in dojo 1.8:

// query element with id=this~is~silly
query("[id='this~is~silly']");

Please find the test case attached.

Attachments (1)

query_test.html (494 bytes) - added by chris2m 7 years ago.
Test Case for dojo/query

Download all attachments as: .zip

Change History (6)

Changed 7 years ago by chris2m

Attachment: query_test.html added

Test Case for dojo/query

comment:1 Changed 7 years ago by Kris Zyp

In [29143]:

Verify that tildes can be used in ids, refs #15319 !strict

comment:2 Changed 7 years ago by Kris Zyp

Resolution: worksforme
Status: newclosed

According to http://www.w3.org/TR/CSS21/grammar.html, tildes must be escaped to be used in the selector ids.

comment:3 Changed 7 years ago by Kris Zyp

In [29146]:

Fix tilde handling in acme, so it can be used in ids, refs #15319 !strict

comment:4 Changed 7 years ago by Colin Snover

In [30038]:

Fix tilde handling in acme, so it can be used in ids, refs #15319 !strict Backport to 1.7. Also fix incomplete backport of changeset [29124].

comment:5 Changed 7 years ago by Colin Snover

Milestone: tbd1.7.5
Note: See TracTickets for help on using tickets.