forked from svrjs/svrjs
Fix the regular expression in the URL parser
This commit is contained in:
parent
a33a86ee62
commit
9fa194b33d
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ function parseURL(uri, prepend) {
|
||||||
|
|
||||||
// Parse the URL using regular expression
|
// Parse the URL using regular expression
|
||||||
let parsedURI = uri.match(
|
let parsedURI = uri.match(
|
||||||
/^(?:([^:]+:)(\/\/)?)?(?:([^@/?#*]+)@)?([^:/?#*]+|\[[^*]\/]\])?(?::([0-9]+))?(\*|\/[^?#]*)?(\?[^#]*)?(#[\S\s]*)?/,
|
/^(?:([^:]+:)(\/\/)?)?(?:([^@/?#*]+)@)?([^:/?#*]+|\[[^*\]/]\])?(?::([0-9]+))?(\*|\/[^?#]*)?(\?[^#]*)?(#[\S\s]*)?/,
|
||||||
);
|
);
|
||||||
// Match 1: protocol
|
// Match 1: protocol
|
||||||
// Match 2: slashes after protocol
|
// Match 2: slashes after protocol
|
||||||
|
|
Reference in a new issue