Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#5411 closed defect (fixed)

dojox.regexp.host uses dojox.regexp.integer, which has been removed

Reported by: guest Owned by: Adam Peller
Priority: high Milestone: 1.1
Component: Dojox Version: 1.0
Keywords: Cc:
Blocked By: Blocking:

Description

The dojo.regexp.host function, which is called by dojox.validate.isUrl relies on a function which has been removed. I think we're supposed to use dojo.number._integerRegexp instead. Patch below... hope it's correct:

===================================================================
--- regexp.js   (revision 11819)
+++ regexp.js   (working copy)
@@ -153,7 +153,7 @@
        var domainNameRE = "([0-9a-zA-Z]([-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?\.)+" + dojox.regexp.tld(flags);
 
        // port number RE
-       var portRE = ( flags.allowPort ) ? "(\:" + dojox.regexp.integer({signed: false}) + ")?" : "";
+       var portRE = ( flags.allowPort ) ? "(\:" + dojo.number._integerRegexp({signed: false}) + ")?" : "";
 
        // build host RE
        var hostNameRE = domainNameRE;

Change History (3)

comment:1 Changed 11 years ago by Adam Peller

nah, this is a non-formatted number, so a simple d+ ought to do it.

comment:2 Changed 11 years ago by Adam Peller

Resolution: fixed
Status: newclosed

(In [11854]) Remove obsolete regexp.integer reference with d+ Fixes #5411

comment:3 Changed 11 years ago by Adam Peller

Milestone: 1.0.31.1

unit tests are still b0rken. See #4350

Note: See TracTickets for help on using tickets.