Skip to main content

Bug Tracker

Side navigation

#3947 closed bug (worksforme)

Opened January 22, 2009 05:06AM UTC

Closed May 20, 2009 09:40PM UTC

Last modified March 15, 2012 02:47PM UTC

Selectors with "$" symbol

Reported by: simon.crowell Owned by: john
Priority: major Milestone: 1.4
Component: selector Version: 1.3.2
Keywords: asp.net, selector, $ Cc:
Blocked by: Blocking:
Description

I have ran into this problem where I was using the a star rating plugin (this is unrelated).

Essentially a selector in the prevAll method that includes a "$" in it does not work in 1.3 but does in 1.2.6. This is relevant to my application as its an asp.net app that relies on the id of the control which is generally coming out with "$" symbols in it.

I understand there would be a work around for this by removing "$" symbols.

Thanks

Attachments (1)
  • prevAll bug.zip (36.3 KB) - added by simon.crowell January 22, 2009 05:08AM UTC.

    Contains Example, Change jQuery version to see different result

Change History (5)

Changed January 22, 2009 10:41AM UTC by balazs.endresz comment:1

http://docs.jquery.com/Selectors

Note: if you wish to use any of the meta-characters described above as a literal part of a name, you must escape the character with two backslashes (\\). For example:

#foo\\\\:bar
#foo\\\\[bar\\\\]
#foo\\\\.bar

Changed January 22, 2009 11:20PM UTC by simon.crowell comment:2

Thanks for your help. I'll post a comment about the fix for the rating plugin as well :)

Thanks

Changed January 23, 2009 11:42AM UTC by balazs.endresz comment:3

Btw IDs can't really contain $ signs:

http://www.w3.org/TR/html4/types.html#h-6.2

Though it's a bit confusing that in 1.2 you didn't have to escape this, Sizzle seems to be stricter on this.

Changed January 24, 2009 02:00PM UTC by balazs.endresz comment:4

In the example there's a class selector in which the $ sign needs to be escaped but I tried that with an ID and the quickexpr doesn't match an ID that contains any special characters. This hasn't been changed much since 1.2.6 so these expressions are handled by the selector engine, which souldn't be necessary. Or is that intentional?

Changed May 20, 2009 09:40PM UTC by john comment:5

milestone: 1.31.3.3
resolution: → worksforme
status: newclosed
version: 1.31.3.2