Bug Tracker

Opened 11 years ago

Closed 11 years ago

#12448 closed bug (fixed)

:contains() edge case throwing an error

Reported by: Motty Owned by: Timmy Willison
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.

Change History (2)

comment:1 Changed 11 years ago by Timmy Willison

Component: unfiledselector
Milestone: None1.next
Owner: set to Timmy Willison
Priority: undecidedhigh
Status: newassigned

comment:2 Changed 11 years ago by Timmy Willison

Milestone: 1.next1.8.2
Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.