Remove double slashes from URLs before matching.

This commit is contained in:
ThePendulum 2018-06-10 01:34:28 +02:00
parent 44f32b3347
commit f579bb2077
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, {