Summary: | REGRESSION: assertion failure with regexp with \B in a case-ignoring character range | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Darin Adler <darin> | ||||||
Component: | JavaScriptCore | Assignee: | Darin Adler <darin> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Blocker | CC: | ap, eric | ||||||
Priority: | P1 | Keywords: | InRadar | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Mac | ||||||||
OS: | OS X 10.5 | ||||||||
Attachments: |
|
Description
Darin Adler
2007-12-15 19:55:44 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. Created attachment 17924 [details]
patch
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. (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. 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.)
Created attachment 17942 [details]
patch, this time matching behavior of Gecko rather than the ECMAScript spec
(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. Comment on attachment 17942 [details]
patch, this time matching behavior of Gecko rather than the ECMAScript spec
r=me
Committed revision 28785. Committed revision 28787. |