Skip to content

Commit

Permalink
Update index.js SocialGouv#277
Browse files Browse the repository at this point in the history
accept //test.com url
  • Loading branch information
tyjak authored Sep 22, 2023
1 parent d2503f3 commit c22dd5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion declaration-rgpd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit c22dd5e

Please sign in to comment.