Bug 50483 - REGRESSION: Event calendar fails to load at http://ipfw.edu/calendar/
Summary: REGRESSION: Event calendar fails to load at http://ipfw.edu/calendar/
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh Intel OS X 10.6
: P1 Normal
Assignee: Nobody
URL: http://ipfw.edu/calendar/
Keywords: Regression
: 50320 50538 50646 50654 50755 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-12-03 13:53 PST by Barton L. Tyner Jr.
Modified: 2011-06-11 13:18 PDT (History)
10 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Barton L. Tyner Jr. 2010-12-03 13:53:40 PST
Using Webkit 534.13+, the calendar fails to draw or present any content. The calendar worked fine in previous versions of Webkit, and it shows up fine in the latest versing of Safari.

The calendar depends heavily on JavaScript.
Comment 1 Alexey Proskuryakov 2010-12-05 00:03:49 PST
I can't reproduce this with a local debug build of r72777, but I can with r73316 nightly - looks like a very recent regression.

SyntaxError: Invalid regular expression: invalid range in character class
Comment 2 Gavin Barraclough 2010-12-05 20:04:55 PST
Hi Barton, Alexey,

This will likely have been caused by:
    https://bugs.webkit.org/show_bug.cgi?id=48100
which made our regex syntax checking slightly more stringent, and ECMA-262 compliant.

We should check the regexes in this page, and see whether they comply to the spec – I'm guessing that one is invalid (specifically, contains an invalid range in a character class - one containing a character class escape, e.g. /[d-\d]/)

Assuming that this is the case, I'm not sure not to proceed.

Option A - Hope that this is not a major cause of problems, and that we can continue to move in the direction of greater spec compliance.  I think a good first course of action would be to treat this as an advocacy issue – we should reach out to IPFW, and recommend that they update the problematic source to be ECMA-262 compliant (this will probably just involve adding an extra missing '\' - under ECMA-262 something like /[d-\d]/ contains an invalid range, but you can just escape the hyphen to turn this into a valid regular expression - /[d\-\d]/. This should match our prior behavior).  If IPFW change their code & no more similar issues arise, this could be a good resolution to the problem.

Option B - Retreat from spec compliance on this matter, revert this change, and settle for noncompliant behavior for now (and raise the matter in TC-39 with a view to hopefully improving the future revisions of the spec).

I'd suggest we start by sticking with option A, since reverting the change immediately loses the ability to track whether or not further dupes come in, and this is a broader problem.  I'd like to strongly believe in complying to the spec on this matter, but since the spec disallows a number of further regex features (e.g. octal escapes) that we don't believe we'll be able to remove without breaking the web I don't think 100% compliance is considered a realistic goal here anyway.

cheers,
G.
Comment 3 Alexey Proskuryakov 2010-12-05 20:33:55 PST
But does the same regex work in both IE and Firefox? Are we getting incompatible with both?
Comment 4 Barton L. Tyner Jr. 2010-12-06 15:24:46 PST
Thanks for the thoughtful response to this issue.

We should be able to fix the escape issue on our end.

Something similar seems to be happening on the TED site. For example, when you go to http://www.ted.com/tedx/events/1758.html, the page fails to draw like the ipfw.edu/calendar page. However, unlike the ipfw.edu/calendar page, the TED page will draw when you do a forced refresh.

Thanks,

Bart
Comment 5 Alexey Proskuryakov 2010-12-06 15:27:39 PST
One ted.com issue is tracked as bug 50526.
Comment 6 Gavin Barraclough 2010-12-07 10:28:47 PST
Okay, that sounds great.  Thanks for the bug report Bart! - & we'll keep tabs on how broad an issue this is, & see if the TED issue can also be resolved through advocacy.

cheers,
G.
Comment 7 Alexey Proskuryakov 2010-12-07 11:37:43 PST
See also: bug 50538.
Comment 8 Gavin Barraclough 2010-12-08 21:51:18 PST
Looks like this change was breaking more sites, so we've largely reverted this change in r73594, related bugs should be fixed.

Behavior post r73594 should broadly match that before pre r72813, with one exception.  While we're no longer generating the syntax errors required by the ECMA-262 spec, we will now only allow ranges permitted by the grammar.  Likely impact is low, but would be visible is expressions such as /[\d-a-z]/.

before r72813 this would be handled as equivalent to /[\d\-a-z]/, i.e a-z will be treated as a range.  Now this will be treated as /[\d\-a\-z]/, which at least complies with the grammar in the spec.
Comment 9 Gavin Barraclough 2010-12-08 21:51:52 PST
*** Bug 50538 has been marked as a duplicate of this bug. ***
Comment 10 Gavin Barraclough 2010-12-08 21:52:08 PST
*** Bug 50654 has been marked as a duplicate of this bug. ***
Comment 11 Gavin Barraclough 2010-12-08 21:52:20 PST
*** Bug 50646 has been marked as a duplicate of this bug. ***
Comment 12 Andy Estes 2011-01-04 20:03:44 PST
*** Bug 50320 has been marked as a duplicate of this bug. ***
Comment 13 Dave Mandelin 2011-05-27 11:44:40 PDT
I had to look into this issue recently while updating Yarr in Firefox. I found that we have test cases that are a little bit stricter than what Yarr currently supports. Namely, we consider these to be syntax errors:

[C-\\s]
[C-\\d]
[C-\\W]
[\\b-\\w]
[\\B-\\w]

(See also https://bugzilla.mozilla.org/show_bug.cgi?id=576837)

Apparently, this is fine for web compat, or at least we haven't received any complaints about it yet. I have a small patch for this if anyone is interested.
Comment 14 Gavin Barraclough 2011-06-11 13:18:04 PDT
*** Bug 50755 has been marked as a duplicate of this bug. ***