diff options
Diffstat (limited to 'lib/utils.coffee')
| -rw-r--r-- | lib/utils.coffee | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/utils.coffee b/lib/utils.coffee index 597e5f6c..c5bfcc26 100644 --- a/lib/utils.coffee +++ b/lib/utils.coffee @@ -47,12 +47,9 @@ Utils = isUrl: (str) -> # More or less RFC compliant URL host part parsing. This should be sufficient for our needs urlRegex = new RegExp( - # user:password (optional) => \1, \2 - '^(?:([^:]+)(?::([^:]+))?@)?' + - # host name (IPv6 addresses in square brackets allowed) => \3 - '([^:]+|\\[[^\\]]+\\])' + - # port number (optional) => \4 - '(?::(\\d+))?$' + '^(?:([^:]+)(?::([^:]+))?@)?' + # user:password (optional) => \1, \2 + '([^:]+|\\[[^\\]]+\\])' + # host name (IPv6 addresses in square brackets allowed) => \3 + '(?::(\\d+))?$' # port number (optional) => \4 ) # Official ASCII TLDs that are longer than 3 characters |
