fix(main.js):catch exp (#619)
This commit is contained in:
parent
88ab9e961d
commit
8d7624fc69
|
@ -138,7 +138,10 @@
|
|||
if (!sitehost) return false;
|
||||
|
||||
// handle relative url
|
||||
const data = new URL(input, 'http://' + sitehost);
|
||||
var data;
|
||||
try {
|
||||
data = new URL(input, 'http://' + sitehost);
|
||||
} catch (e) { return false;}
|
||||
|
||||
// handle mailto: javascript: vbscript: and so on
|
||||
if (data.origin === 'null') return false;
|
||||
|
|
Loading…
Reference in New Issue