Opened 12 years ago

Closed 12 years ago

#5478 closed defect (wontfix)

Regex pattern causes Shrinksafe to output "null"

Reported by: guest Owned by: alex
Priority: high Milestone:
Component: ShrinkSafe Version: 0.9
Keywords: Cc: michael@…
Blocked By: Blocking:

Description (last modified by Adam Peller)

Using the online Shrinksafe at http://alex.dojotoolkit.org/shrinksafe/ on 12/29/1997

(On WinXPpro, running Firefox2, although that seems irrelevant since online dojo is being employed here.)

Issue:

The presence of this regex pattern in my script:

var patt=/((ftp://|http://|https://|ftp://www.|http://www.|https://www.|www.)(([A-Za-z0-9$_.+!*(),;/?:@&~=-])|%[A-Fa-f0-9]{2}){2,}(#([a-zA-Z0-9][a-zA-Z0-9$_.+!*(),;/?:@&~=%-]*))?([A-Za-z0-9$_+!*();/?:~-]))/gi;

which matches urls, causes Shrinksafe to output "null" for the entire script. I have tested with this line alone as well, and again, Shrinksafe outputs "null".

E Michael Brandt michael@…

Change History (5)

comment:1 Changed 12 years ago by Adam Peller

Component: GeneralShrinkSafe
Owner: changed from anonymous to alex

comment:2 Changed 12 years ago by Adam Peller

Cc: michael@… added
Description: modified (diff)

When I enter this in plain Rhino (including the latest release) it comes back with a syntax error on the "~" near the end.

So, perhaps this is a Rhino bug? If so, this should be marked invalid and pursued in bugzilla. Or, perhaps there is some issue with non-standard JS regexp syntax?

comment:3 Changed 12 years ago by Adam Peller

fwiw, I think there's code in dojox.regexp or dojox.validate you may be able to use to do this

comment:4 Changed 12 years ago by guest

Thanks for this info and for helping with this issue. Being new to this, can you tell me how I would know when the online Shrinksafe has had this issue fixed?

comment:5 Changed 12 years ago by Adam Peller

Resolution: wontfix
Status: newclosed

I guess I'm saying we can't service Rhino bugs. I'd suggest you verify that this line functions in other JS environments (sounds like you have) and pursue directly with the authors of Rhino at bugzilla.mozilla.org. Once the issue is resolved, you can file a new ticket here or reopen this bug and ask us to upgrade ShrinkSafe?, which is built directly on Rhino.

Note: See TracTickets for help on using tickets.