Bug Tracker

Modify

Ticket #12448 (closed bug: fixed)

Opened 20 months ago

Last modified 19 months ago

: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:
Blocking: Blocked by:

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

comment:1 Changed 20 months ago by timmywil

  • Owner set to timmywil
  • Priority changed from undecided to high
  • Status changed from new to assigned
  • Component changed from unfiled to selector
  • Milestone changed from None to 1.next

comment:2 Changed 19 months ago by timmywil

  • Status changed from assigned to closed
  • Resolution set to fixed
  • Milestone changed from 1.next to 1.8.2

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.