mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-11 15:10:45 +01:00
isRelativeUrl back and switched to use isProtocolAbsoluteUrl
This commit is contained in:
@@ -530,9 +530,14 @@ var isBrowser = false;
|
||||
|
||||
// scheme-absolute seems to win the people's consensus
|
||||
// https://stackoverflow.com/questions/15581445/are-protocol-relative-urls-relative-urls
|
||||
// but protocol-absolute might be needed as well when checking is external url or not
|
||||
// BUT the behavior is different from the server and the client
|
||||
// so we use isProtocolAbsoluteUrl()
|
||||
isAbsoluteUrl: function (url) {
|
||||
return utils.isSchemeAbsoluteUrl(url);
|
||||
return utils.isProtocolAbsoluteUrl(url);
|
||||
},
|
||||
|
||||
isRelativeUrl: function (url) {
|
||||
return !utils.isAbsoluteUrl(url);
|
||||
},
|
||||
|
||||
makeNumbersHumanReadable: function (elements) {
|
||||
|
||||
Reference in New Issue
Block a user