[Webkit-unassigned] [Bug 50554] New: RegExp.prototype.toString does not escape slashes
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Dec 6 00:49:46 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=50554
Summary: RegExp.prototype.toString does not escape slashes
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
OS/Version: All
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: JavaScriptCore
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: jandemooij at gmail.com
Consider this: RegExp("abc/def").toString()
Result in FF and Opera: /abc\/def/
Result in Chrome and Safari: /abc/def/
It does work correctly for literal regexps like /abc\/def/.toString()
ES5 15.10.6.4 mentions this:
===
NOTE The returned String has the form of a RegularExpressionLiteral that evaluates to another RegExp object with the same behaviour as this object.
===
/abc/def/ is invalid as regexp literal, so the behavior is different in Safari/Chrome.
FWIW, here is the V8 bug: http://code.google.com/p/v8/issues/detail?id=956
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list