From 24aedad38c9d8fd97107031570a5bab007f3d0c2 Mon Sep 17 00:00:00 2001 From: hackademix Date: Wed, 25 Mar 2020 14:58:34 +0100 Subject: Further refresh syntax parsing leniency (thanks insertscript). --- src/content/content.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/content/content.js') diff --git a/src/content/content.js b/src/content/content.js index 46c6fc5..d13d13e 100644 --- a/src/content/content.js +++ b/src/content/content.js @@ -118,7 +118,7 @@ notifyPage(); addEventListener("DOMContentLoaded", e => { if (ns.canScript) return; for (let m of document.querySelectorAll("meta[http-equiv=refresh]")) { - if (/^[^,;]*[,;]\W*url[^=]*=[^!#$%&()*+,/:;=?@[\]\w.,~-]*data:/i.test(m.getAttribute("content"))) { + if (/^[^,;]*[,;](?:\W*url[^=]*=)?[^!#$%&()*+,/:;=?@[\]\w.,~-]*data:/i.test(m.getAttribute("content"))) { let url = m.getAttribute("content").replace(/.*?(?=data:)/i, ""); log(`Blocking refresh to ${url}`); window.stop(); -- cgit v1.2.3