summaryrefslogtreecommitdiff
path: root/lib/url.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2016-11-05 19:08:31 -0700
committerRich Trott <rtrott@gmail.com>2016-11-09 16:40:38 -0800
commit7ef16eee2f0b69a2e5004f249cb4ebeb7000733e (patch)
treee70c0bc506e111e4ed4ef20ce1b9a9d7c27de246 /lib/url.js
parent4aca347527fecab0a394cc39ffdf75c76c794fe5 (diff)
downloadandroid-node-v8-7ef16eee2f0b69a2e5004f249cb4ebeb7000733e.tar.gz
android-node-v8-7ef16eee2f0b69a2e5004f249cb4ebeb7000733e.tar.bz2
android-node-v8-7ef16eee2f0b69a2e5004f249cb4ebeb7000733e.zip
lib,test: 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/9485 Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
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 201ebfedcc..a199f4b581 100644
--- a/lib/url.js
+++ b/lib/url.js
@@ -204,7 +204,7 @@ Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {
// user@server is *always* interpreted as a hostname, and url
// resolution will treat //foo/bar as host=foo,path=bar because that's
// how the browser resolves relative URLs.
- if (slashesDenoteHost || proto || /^\/\/[^@\/]+@[^@\/]+/.test(rest)) {
+ if (slashesDenoteHost || proto || /^\/\/[^@/]+@[^@/]+/.test(rest)) {
var slashes = rest.charCodeAt(0) === 47/*/*/ &&
rest.charCodeAt(1) === 47/*/*/;
if (slashes && !(proto && hostlessProtocol[proto])) {