RESOLVED FIXED 16459
REGRESSION: assertion failure with regexp with \B in a case-ignoring character range
https://bugs.webkit.org/show_bug.cgi?id=16459
Summary REGRESSION: assertion failure with regexp with \B in a case-ignoring characte...
Darin Adler
Reported 2007-12-15 19:55:44 PST
We get an assertion compiling this regular expression: /|[x\B-\u00b5]/i; <rdar://problem/5646361>
Attachments
patch (7.95 KB, patch)
2007-12-15 20:39 PST, Darin Adler
mjs: review-
patch, this time matching behavior of Gecko rather than the ECMAScript spec (7.14 KB, patch)
2007-12-16 15:52 PST, Darin Adler
mjs: review+
Darin Adler
Comment 1 2007-12-15 20:28:39 PST
The issue is specific to the use of the "\B" escape sequence inside a character class. It's supposed to be an error to do that.
Darin Adler
Comment 2 2007-12-15 20:39:49 PST
Alexey Proskuryakov
Comment 3 2007-12-16 12:46:15 PST
I haven't looked at the spec yet, but in Firefox, javascript:alert(/|[x\B-\u00b5]/) doesn't raise an error. Perhaps the test and/or ChangeLog should mention that this is an intentional difference in behavior.
Darin Adler
Comment 4 2007-12-16 13:08:19 PST
(In reply to comment #3) > I haven't looked at the spec yet, but in Firefox, > javascript:alert(/|[x\B-\u00b5]/) doesn't raise an error. Perhaps the test > and/or ChangeLog should mention that this is an intentional difference in > behavior. We could also have \B mean just "B" in character classes if that matches the other browsers. That's a simple change.
Maciej Stachowiak
Comment 5 2007-12-16 15:11:27 PST
Comment on attachment 17924 [details] patch Marking r- per Alexey's comment - it would be better to match other browsers for this case. (If that's hard to do right away, we can file a follow-up bug.)
Darin Adler
Comment 6 2007-12-16 15:52:25 PST
Created attachment 17942 [details] patch, this time matching behavior of Gecko rather than the ECMAScript spec
Darin Adler
Comment 7 2007-12-16 15:56:18 PST
(In reply to comment #5) > it would be better to match other browsers > for this case. (If that's hard to do right away, we can file a follow-up bug.) It was easy to do. I haven't tested IE yet, though.
Maciej Stachowiak
Comment 8 2007-12-16 16:37:48 PST
Comment on attachment 17942 [details] patch, this time matching behavior of Gecko rather than the ECMAScript spec r=me
Darin Adler
Comment 9 2007-12-16 17:32:21 PST
Committed revision 28785. Committed revision 28787.
Note You need to log in before you can comment on or make changes to this bug.