mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-26 20:34:44 +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 {
|
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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user