« Bugzilla Issues Index
#1660 — 15.10.3.3, EscapeRegExpPattern: Line breaks and escape sequences not handled
- bug_id:
1660
- creation_ts:
2013-07-31 04:23:00 -0700
- short_desc:
15.10.3.3, EscapeRegExpPattern: Line breaks and escape sequences not handled
- delta_ts:
2013-10-29 09:44:44 -0700
- product:
Draft for 6th Edition
- component:
technical issue
- version:
Rev 16: July 15, 2013 Draft
- rep_platform:
All
- op_sys:
All
- bug_status:
RESOLVED
- resolution:
FIXED
- priority:
Normal
- bug_severity:
enhancement
- everconfirmed:
true
- reporter:
André Bargull
- assigned_to:
Allen Wirfs-Brock
- commentid:
4634
- comment_count:
0
- who:
André Bargull
- bug_when:
2013-07-31 04:23:30 -0700
EscapeRegExpPattern currently only handles the "/" character, but it should also handle line breaks and escape sequences.
Escape sequences are mainly of interest when escaping line breaks to avoid invalid double escapes.
Tests:
eval(RegExp("\n").toString())
-> should evaluate to a new RegExp, but throws a SyntaxError in multiple browsers
RegExp("\n").source === RegExp("\\\n").source
-> This is just an example where line breaks in escape sequences must not be double escaped
- commentid:
6012
- comment_count:
1
- who:
Allen Wirfs-Brock
- bug_when:
2013-10-28 13:25:40 -0700
fixed in rev20 editor's draft
- commentid:
6033
- comment_count:
2
- who:
Allen Wirfs-Brock
- bug_when:
2013-10-29 09:44:44 -0700
fixed in rev20 draft, Oct. 28, 2013