Skip to main content

Bug Tracker

Side navigation

#5607 closed bug (duplicate)

Opened December 06, 2009 04:45AM UTC

Closed November 19, 2010 10:06AM UTC

Last modified November 19, 2010 10:06AM UTC

:contains() selector doesn't support parentheses

Reported by: Sanity Owned by:
Priority: major Milestone: 1.4
Component: selector Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:
Description

So, it seems I don't actually need quotes when using contains:

$(':contains(foo)') works as expected.

$(':contains("foo")') does the exact same thing.

$(':contains("(foo")') dies with: Syntax error, unrecognized expression: "(assembling")

So I have to wonder, what is the point of the quotes if they don't actually escape anything? Should they be dropped, or should this be fixed to allow parens?

Attachments (0)
Change History (4)

Changed June 13, 2010 07:07PM UTC by dmethvin comment:1

component: unfiledselector

Changed November 15, 2010 02:53PM UTC by mynameissam@gmail.com comment:2

I'm seeing the same issue too. Escaping the parentheses doesn't work. Below is a jsFiddle test case that will replicate the bug:

http://jsfiddle.net/vXSKm/1/

Changed November 19, 2010 10:06AM UTC by snover comment:3

resolution: → duplicate
status: newclosed

Changed November 19, 2010 10:06AM UTC by snover comment:4

Duplicate of #5482.