Skip to main content

Bug Tracker

Side navigation

#13771 closed bug (notabug)

Opened April 12, 2013 08:45PM UTC

Closed April 13, 2013 02:41PM UTC

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

Reported by: elvanor@gmail.com 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 :-)

Attachments (0)
Change History (1)

Changed April 13, 2013 02:41PM UTC by gibson042 comment:1

component: unfiledselector
resolution: → notabug
status: newclosed

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