Fixed meta-refresh emulation getting confused by quoted URLs.
This commit is contained in:
parent
a9e1051018
commit
66adf2720e
|
@ -12,7 +12,7 @@ function onScriptDisabled() {
|
||||||
let [secs, url] = content.split(/\s*;\s*url\s*=\s*/i);
|
let [secs, url] = content.split(/\s*;\s*url\s*=\s*/i);
|
||||||
if (url) {
|
if (url) {
|
||||||
try {
|
try {
|
||||||
let urlObj = new URL(url);
|
let urlObj = new URL(url.replace(/^(['"]?)(.+?)\1$/, '$2'));
|
||||||
if (!/^https?:/.test(urlObj.protocol)) {
|
if (!/^https?:/.test(urlObj.protocol)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue