Ticket #308 (closed defect: fixed)

Opened 2 months ago

Last modified 2 months ago

MochiKit trunk (r1378) causes "invalid range in character class" error

Reported by: anonymous Assigned to: somebody
Priority: high Milestone:
Component: component1 Version:
Severity: major Keywords:
Cc:

Description

On Firefox 2.0.0.14, I get the error

"invalid range in character class"

when I try to include MochiKit r1378.

It looks like the problem is on line 57 of LoggingPane?.js, where it says

        // name the popup with the base URL for uniqueness
        var url = win.location.href.split("?")[0].replace(/[#:\/.><&-%]/g, "_");
        var name = uid + "_" + url;
        var nwin = win.open("", name, "dependent,resizable,height=200");

I assume that the character class is supposed to include the minus sign; certainly the class [&-%] doesn't make much sense because that would be backwards and would only contain & and % in any case. I think perhaps it should read

        // name the popup with the base URL for uniqueness
        var url = win.location.href.split("?")[0].replace(/[#:\/.><&%\-]/g, "_");
        var name = uid + "_" + url;
        var nwin = win.open("", name, "dependent,resizable,height=200");

or similar.

Change History

05/23/08 01:41:30 changed by cederberg@gmail.com

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in [1379].