[Webkit-unassigned] [Bug 170151] New: String.prototype.replace incorrectly applies "special replacement parameters" when passed a function

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 27 17:45:24 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=170151

            Bug ID: 170151
           Summary: String.prototype.replace incorrectly applies "special
                    replacement parameters" when passed a function
           Product: WebKit
           Version: Safari 10
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: twalpole at gmail.com

When String.prototype.replace is passed a function as a second parameter it is incorrectly applying "special replacement patterns" to the returned results

var a="ABC";
a.replace("B", function(){ return "$$" });  // Should be "A$$C" - in Safari 10.1 and 10.2 it is "A$C"

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170328/50670dbe/attachment.html>


More information about the webkit-unassigned mailing list