summaryrefslogtreecommitdiff
path: root/src/content
diff options
context:
space:
mode:
authorhackademix2020-03-25 14:58:34 +0100
committerhackademix2020-03-25 14:59:48 +0100
commit24aedad38c9d8fd97107031570a5bab007f3d0c2 (patch)
tree3f2522e9a6d47e6b6fb729550bd5c117c1f516ae /src/content
parentf10166117553bb36f0348e3c57f395abfff82e1a (diff)
downloadnoscript-24aedad38c9d8fd97107031570a5bab007f3d0c2.tar.gz
noscript-24aedad38c9d8fd97107031570a5bab007f3d0c2.tar.xz
noscript-24aedad38c9d8fd97107031570a5bab007f3d0c2.zip
Further refresh syntax parsing leniency (thanks insertscript).
Diffstat (limited to 'src/content')
-rw-r--r--src/content/content.js2
1 files changed, 1 insertions, 1 deletions
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();