From c22dd5e829a1305153c3869d5e028e4aa07a3564 Mon Sep 17 00:00:00 2001 From: tyjak Date: Fri, 22 Sep 2023 15:15:15 +0200 Subject: [PATCH] Update index.js #277 accept //test.com url --- declaration-rgpd/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/declaration-rgpd/index.js b/declaration-rgpd/index.js index 638fe4e8..5a02fcfb 100644 --- a/declaration-rgpd/index.js +++ b/declaration-rgpd/index.js @@ -63,7 +63,7 @@ const getDeclarationUrl = (dom, bestMatch, url) => { // make URL absolute when possible const link = a.getAttribute("href"); if (link !== "#") { - if (link.match(/^https?:\/\//) || link.match(/^\/\//) { + if (link.match(/^https?:\/\//) || link.match(/^\/\//)) { declarationUrl = link; } else if (link.charAt(0) === "/") { const host = url.replace(/(https?:\/\/[^/]+).*/, "$1");