Opened 9 years ago

Closed 9 years ago

Last modified 7 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:

Description

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: http://forum.jquery.com/topic/single-or-double-escaping-difference

Change History (3)

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

Resolution: invalid
Status: newclosed

Please report this in jQuery core's bug tracker.

comment:2 Changed 9 years ago by gnarkj

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

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

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.