Bug 23641
Summary: | REGRESSION: Parsing octal escapes in regular expressions has changed | ||
---|---|---|---|
Product: | WebKit | Reporter: | Erik Corry <erikcorry> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WORKSFORME | ||
Severity: | Normal | CC: | barraclough |
Priority: | P2 | Keywords: | HasReduction, InRadar, Regression |
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | Linux |
Erik Corry
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
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Mark Rowe (bdash)
<rdar://problem/6543257>
Darin Adler
Any evidence of real-world sites this affects?
Gavin Barraclough
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.