Opened 13 years ago

Closed 13 years ago

Last modified 10 years ago

#5874 closed bug (notabug)

escaping in selectors does not work as documented and like ff native impl does

Reported by: gnarkj Owned by:
Priority: major Milestone:
Component: ui.core Version: 1.8.2
Keywords: selector escaping Cc:
Blocked by: Blocking:


according to the jquery doc all "meta-characters: #;&,.+*~':"^$[]()=>|/" should be escaped. this is all correct. debugging into find() we end up with the native implementation document.querySelectorAll or with sizzle. the first behaves like documented the second does not: backslashes in string are always treated as literals and do not help defining the syntax.

found in jquery-1.4.2 and the nightly build.

use "img[src*=
.gif]" in firebug in firefox on the jquery home page with and without a non-document context to see that it will find the logo with no or a document context utilizing the native .querySelectorAll and that it will find nothing with a body (or any other node) context.

use "img[src*=hallo
[ballo]" in any script with a non-document context and debug in ATTR-filter object creation to see that only "hallo" arrives there but we expected "hallo][ballo".

probably this is actually a sizzle bug. but still it needs to be documented here.

the issue refers to escaping questions like these:

Change History (3)

comment:1 Changed 13 years ago by Scott González

Resolution: invalid
Status: newclosed

Please report this in jQuery core's bug tracker.

comment:2 Changed 13 years ago by gnarkj

whoops ... i thought i was there ... sorry i got confused with the tracking platforms :)

comment:3 Changed 10 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.