Safe Link: Fix for "URI malformed" exception (#1824)

This commit is contained in:
Alexander Zinchuk 2022-04-19 15:11:44 +02:00
parent 986d4d867d
commit facb6eac5f

View File

@ -84,7 +84,7 @@ function getDomain(url?: string) {
} }
try { try {
let decodedHref = decodeURI(href); let decodedHref = decodeURI(href.replace(/%%/g, '%25'));
const match = decodedHref.match(/^https?:\/\/([^/:?#]+)(?:[/:?#]|$)/i); const match = decodedHref.match(/^https?:\/\/([^/:?#]+)(?:[/:?#]|$)/i);
if (!match) { if (!match) {