From bbb03a08e93f2f6826a4ecf08c49ce365e8c7c9d Mon Sep 17 00:00:00 2001 From: Aziz Khoury Date: Wed, 18 Dec 2019 16:08:04 +0200 Subject: [PATCH] isRelativeUrl back and switched to use isProtocolAbsoluteUrl --- public/src/utils.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/public/src/utils.js b/public/src/utils.js index 069b534480..6a6e213aa7 100644 --- a/public/src/utils.js +++ b/public/src/utils.js @@ -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) {