Remove double slashes from URLs before matching.

This commit is contained in:
DebaucheryLibrarian 2024-09-11 05:16:55 +02:00
parent a56a5c9a10
commit 20a9c01444
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ module.exports = function dissectLink(url) {
return acc;
}
const match = host.pattern.match(url);
const match = host.pattern.match(url.replace(/(https?:\/\/)|(\/)+/g, '$1$2')); // remove double slashes
if(match) {
return Object.assign(match, {