Skip to main content

Bug Tracker

Side navigation

#12087 closed bug (fixed)

Opened July 16, 2012 12:58PM UTC

Closed July 20, 2012 02:08AM UTC

find selector doesn't work any more with an expando containing a coma

Reported by: anonymous Owned by: gibson042
Priority: low Milestone: None
Component: selector Version: 1.8b2
Keywords: Cc:
Blocked by: Blocking:
Description

Hello,

This is the kind of use case I have on my application:

http://jsfiddle.net/zbDvU/1/

It seems that div.find('span[data-expando="AA,BB"]') returns nothing in the 1.8 (it works with the 1.7 version).

As you can see in the test, it also works in the 1.8, without the coma.

Additionally, please note that $('span[data-expando="AA,BB"]') returns results.

Thanks for your work !

Attachments (0)
Change History (6)

Changed July 16, 2012 02:21PM UTC by addyosmani comment:1

component: unfiledselector
priority: undecidedlow
resolution: → worksforme
status: newclosed

From our documentation:

If you wish to use any of the meta-characters ( such as !"#$%&'()*+,./:;<=>?@[\\]^`{|}~ ) as a literal part of a name, you must escape the character with two backslashes: \\\\

Applying this to your selector results in a test case that works fine: http://jsfiddle.net/WpGGh/

Changed July 16, 2012 02:39PM UTC by anonymous comment:2

ok, I missed that point in the documentation.

I'll change my code accordingly.

Thanks a lot.

Changed July 16, 2012 04:18PM UTC by gibson042 comment:3

resolution: worksforme
status: closedreopened

Changed July 16, 2012 04:18PM UTC by gibson042 comment:4

owner: → gibson042
status: reopenedassigned

Changed July 16, 2012 05:25PM UTC by gibson042 comment:5

Changed July 20, 2012 02:08AM UTC by Dave Methvin comment:6

resolution: → fixed
status: assignedclosed

Update Sizzle to fix #12082, #12087.

Changeset: f70a696598f14917e49dc108271788e2ec2f6587