summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhackademix2020-03-21 01:55:22 +0100
committerhackademix2020-03-21 01:55:22 +0100
commit8b3a36b2e463fa12fbac746a2a772b00268fc6f1 (patch)
tree8a0b4e6186bcf2788507b67b4bf3ee25ec60925a /src
parente1cf2bb6703f3d12702af7f7da488043c25edd7f (diff)
downloadnoscript-8b3a36b2e463fa12fbac746a2a772b00268fc6f1.tar.gz
noscript-8b3a36b2e463fa12fbac746a2a772b00268fc6f1.tar.xz
noscript-8b3a36b2e463fa12fbac746a2a772b00268fc6f1.zip
Fixed URL matching regexp (thanks insertscript).
Diffstat (limited to 'src')
-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 29330b7..46c6fc5 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();