mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-26 12:24:46 +01:00
Safe Link: Fix for "URI malformed" exception (#1824)
This commit is contained in:
parent
986d4d867d
commit
facb6eac5f
@ -84,7 +84,7 @@ function getDomain(url?: string) {
|
||||
}
|
||||
|
||||
try {
|
||||
let decodedHref = decodeURI(href);
|
||||
let decodedHref = decodeURI(href.replace(/%%/g, '%25'));
|
||||
|
||||
const match = decodedHref.match(/^https?:\/\/([^/:?#]+)(?:[/:?#]|$)/i);
|
||||
if (!match) {
|
||||
|
Loading…
Reference in New Issue
Block a user