Bug Tracker

Opened 7 years ago

Closed 7 years ago

#13771 closed bug (notabug)

Sizzle: p:contains(text) fails when text has both parenthesis and newlines

Reported by: elvanor@… Owned by:
Priority: undecided Milestone: None
Component: selector Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:

Description

I am using latest version of Sizzle as time of writing (1.9.2-pre, 2013-04-09.

Reproducing is easy: type Sizzle("p:contains(fo(o\nbar)") in console. You get: Syntax error, unrecognized expression: p:contains(fo(o bar), at least in Chrome.

I suspect a regular expression missing the global flag to pass newlines, but I did not look at the code in detail.

(Actually the previous version of Sizzle I was using had much more problems with strange pseudo selectors such as this one, so this is already an improvement.)

Please fix :-)

Change History (1)

comment:1 Changed 7 years ago by gibson042

Component: unfiledselector
Resolution: notabug
Status: newclosed

Please quote complicated pseudo-selector arguments: http://jsfiddle.net/avsMS/

Note: See TracTickets for help on using tickets.