mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-10 09:32:59 +01:00
rename parseUrl to urlParse, closer to core url module, url.parse
This commit is contained in:
@@ -488,10 +488,10 @@
|
||||
},
|
||||
|
||||
urlToLocation: function (url) {
|
||||
return utils.parseUrl(url, true, true);
|
||||
return utils.urlParse(url, true, true);
|
||||
},
|
||||
|
||||
parseUrl: function (url, parseQueryString, slashesDenoteHost) {
|
||||
urlParse: function (url, parseQueryString, slashesDenoteHost) {
|
||||
if (isBrowser) {
|
||||
var a = document.createElement('a');
|
||||
a.href = url;
|
||||
@@ -502,7 +502,7 @@
|
||||
|
||||
isProtocolAbsoluteUrl: function (url) {
|
||||
url = url.replace(/^\/{3,}/, '//');
|
||||
var a = utils.parseUrl(url, true, true);
|
||||
var a = utils.urlParse(url, true, true);
|
||||
if (isBrowser) {
|
||||
return a.host !== window.location.host;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user