[Webkit-unassigned] [Bug 7919] New: JavaScript String.prototype.replace does not respect "$&" replacements
bugzilla-daemon at opendarwin.org
bugzilla-daemon at opendarwin.org
Wed Mar 22 13:34:37 PST 2006
http://bugzilla.opendarwin.org/show_bug.cgi?id=7919
Summary: JavaScript String.prototype.replace does not respect
"$&" replacements
Product: WebKit
Version: 420+ (nightly)
Platform: Macintosh
OS/Version: Mac OS X 10.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: JavaScript
AssignedTo: webkit-unassigned at opendarwin.org
ReportedBy: Udo.Borkowski at gmx.de
The JavaScript implementation for String.prototype.replace does not respect the
"$&" replacement. This sequence should be replaced with the matched text.
E.g.:
"and more ...".replace(/\./g, "$&")
wrongly evaluates to
"and more $&$&$&"
Correct value would be:
"and more ..."
(For details see "15.5.4.11 String.prototype.replace (searchValue,
replaceValue)" in "ECMA-262: ECMAScript specification", page 102
(http://www.ecma-international.org/publications/standards/Ecma-262.htm))
Please also verify if the other "$" replacements documented there are
supported.
(I used Safari 2.0.3)
--
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list