summaryrefslogtreecommitdiff
path: root/lib/url.js
diff options
context:
space:
mode:
authorPrince J Wesley <princejohnwesley@gmail.com>2016-11-14 12:53:35 +0530
committerRich Trott <rtrott@gmail.com>2016-11-23 22:06:24 -0800
commit0f4c7b8c371caae4cd4a2cb1fa03d2079f75663d (patch)
tree116e98d6218afb2472fb9443bfecf3b0694623b8 /lib/url.js
parentc1133f41b6566bc9ce25d4ac0b83f038ccdacc71 (diff)
downloadandroid-node-v8-0f4c7b8c371caae4cd4a2cb1fa03d2079f75663d.tar.gz
android-node-v8-0f4c7b8c371caae4cd4a2cb1fa03d2079f75663d.tar.bz2
android-node-v8-0f4c7b8c371caae4cd4a2cb1fa03d2079f75663d.zip
lib,tools: remove unneeded escaping of /
The `/` character does not need to be escaped when occurring inside a character class in a regular expression. Remove such instances of escaping in the code base. PR-URL: https://github.com/nodejs/node/pull/9591 Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
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 a199f4b581..5f87c0c36c 100644
--- a/lib/url.js
+++ b/lib/url.js
@@ -44,7 +44,7 @@ const protocolPattern = /^([a-z0-9.+-]+:)/i;
const portPattern = /:[0-9]*$/;
// Special case for a simple path URL
-const simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/;
+const simplePathPattern = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/;
const hostnameMaxLen = 255;
// protocols that can allow "unsafe" and "unwise" chars.