diff --git a/src/content/content.js b/src/content/content.js index 43827a2..29330b7 100644 --- a/src/content/content.js +++ b/src/content/content.js @@ -118,8 +118,8 @@ notifyPage(); addEventListener("DOMContentLoaded", e => { if (ns.canScript) return; for (let m of document.querySelectorAll("meta[http-equiv=refresh]")) { - if (/^[^,;]*[,;]url[^\w=]*=\s*data:/.test(m.getAttribute("content"))) { - let url = m.getAttribute("content").replace(/.*?(?=data:)/, ""); + 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(); }