Side navigation
#12448 closed bug (fixed)
Opened September 03, 2012 05:59PM UTC
Closed September 20, 2012 02:22PM UTC
:contains() edge case throwing an error
Reported by: | Motty | Owned by: | timmywil |
---|---|---|---|
Priority: | high | Milestone: | 1.8.2 |
Component: | selector | Version: | 1.8.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
As I said, this is probably an edge case but this error doesn't occur in jQuery versions prior to 1.8.
When I use the contains selector to try and target an element containing a position selector text like this:
$('li:contains("\\:first")');
I get an error:
Uncaught Error: Syntax error, unrecognized expression: :contains(" jquery-1.8.0.js:4512
Here is a demo which works fine in older versions of jQuery.
Attachments (0)
Change History (2)
Changed September 04, 2012 03:00PM UTC by comment:1
component: | unfiled → selector |
---|---|
milestone: | None → 1.next |
owner: | → timmywil |
priority: | undecided → high |
status: | new → assigned |
Changed September 20, 2012 02:22PM UTC by comment:2
milestone: | 1.next → 1.8.2 |
---|---|
resolution: | → fixed |
status: | assigned → closed |
This was fixed by the all-encompassing https://github.com/jquery/sizzle/commit/6b8b9bf6b051de462972b8e4df1a7bdc91f17bfa