WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
23409
REGRESSION: RegExp 'replace()' function improperly processes '$$'
https://bugs.webkit.org/show_bug.cgi?id=23409
Summary
REGRESSION: RegExp 'replace()' function improperly processes '$$'
William J. Edney
Reported
2009-01-17 17:28:19 PST
All - I've attached a testcase that shows that Webkit's JS engine is no longer properly processing '$$' when present in a replace() using a RegExp, where the replacement is a String (in Safari 3.2.X, this is working fine). Within the replacement String, '$' is used as a metacharacter along with a number or other special character to reference part of a match. Therefore, to output a '$', you need to use '$$'. This should output a single '$'. But in the latest Webkit builds (I'm using
r40000
), a '$$' is output when this syntax is used. All other browsers, FF 3.0.X, IE7+, Chrome properly process this (as does Safari as mentioned above). I've attached a small testcase. Cheers, - Bill
Attachments
A testcase demonstrating how '$$' is broken.
(546 bytes, text/html)
2009-01-17 17:29 PST
,
William J. Edney
no flags
Details
patch
(5.34 KB, patch)
2009-01-19 12:54 PST
,
Darin Adler
sam
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
William J. Edney
Comment 1
2009-01-17 17:29:33 PST
Created
attachment 26830
[details]
A testcase demonstrating how '$$' is broken.
Mark Rowe (bdash)
Comment 2
2009-01-18 15:46:30 PST
<
rdar://problem/6505723
>
Darin Adler
Comment 3
2009-01-19 12:54:58 PST
Created
attachment 26849
[details]
patch
Darin Adler
Comment 4
2009-01-19 15:35:08 PST
http://trac.webkit.org/changeset/40042
William J. Edney
Comment 5
2009-01-23 13:53:40 PST
Verified fixed in build 40102. Thanks guys! Cheers, - Bill
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug