[Webkit-unassigned] [Bug 50554] RegExp.prototype.toString does not escape slashes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 13 18:13:38 PST 2011


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


Mark Hahnenberg <mhahnenb at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mhahnenb at gmail.com




--- Comment #1 from Mark Hahnenberg <mhahnenb at gmail.com>  2011-01-13 18:13:37 PST ---
There also appears to be a related discrepancy between the behaviors of the source property of RegExp objects in Firefox and Chrome/Safari.  

RegExp("abc/def").source

Result in FF: abc\/def
Result in Chrome/Safari: abc/def

I have a patch that fixes the problem with toString() without modifying the behavior of the source property, but it would be much simpler if the behavior of the source property needed to change as well.  Is this what needs to happen?

>From ES5 15.10.7.1:
"The value of the source property is a String in the form of a Pattern representing the current regular expression."

The grammar for Patterns (15.10.1) seems to indicate that the way Firefox does it is incorrect.

-- 
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