summaryrefslogtreecommitdiff
path: root/lib/url.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/url.js')
-rw-r--r--lib/url.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/url.js b/lib/url.js
index 7a28e0064..7b4e1b397 100644
--- a/lib/url.js
+++ b/lib/url.js
@@ -30,7 +30,7 @@ exports.format = urlFormat;
// define these here so at least they only have to be
// compiled once on the first module load.
-var protocolPattern = /^([a-z0-9+]+:)/i,
+var protocolPattern = /^([a-z0-9.+-]+:)/i,
portPattern = /:[0-9]+$/,
// RFC 2396: characters reserved for delimiting URLs.
delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'],