Bug 23641 - REGRESSION: Parsing octal escapes in regular expressions has changed
Summary: REGRESSION: Parsing octal escapes in regular expressions has changed
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: HasReduction, InRadar, Regression
Depends on:
Blocks:
 
Reported: 2009-01-30 04:58 PST by Erik Corry
Modified: 2012-09-06 23:28 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Corry 2009-01-30 04:58:17 PST
I suspect this may be an unintentional WREC change.  Safari used to do the same as IE on this one, now it doesn't.  We are dealing with syntax that the standard deems incorrect, but no browser seems to throw a syntax error on it.

Test JS:

abc\0def\00pqr\000xyz\0000AB/.exec("abc\0def\00pqr\000xyz\0000AB")

Old result was a string starting with "abc".  New result is null.

The problem is the interpretation of \0000
Comment 1 Mark Rowe (bdash) 2009-01-30 06:39:05 PST
<rdar://problem/6543257>
Comment 2 Darin Adler 2009-03-12 14:18:05 PDT
Any evidence of real-world sites this affects?
Comment 3 Gavin Barraclough 2012-09-06 23:28:44 PDT
The new behaviour makes more sense (allowing an arbitrarily long string of zeros was plain odd!), we've been shipping this way for three years, and we match firefox.

I don't think we want to change back to the old way.