summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhackademix2019-07-25 15:14:23 +0200
committerhackademix2019-07-25 15:14:23 +0200
commitcae465b19c6c03ecfa7de78af5d8b9cc7ff469c9 (patch)
tree9d74d29cc500377a15bf16e54b5ac9d18be73178
parent7aab9ae4266d70344f7d1b2f185c760b19cb6908 (diff)
downloadnoscript-cae465b19c6c03ecfa7de78af5d8b9cc7ff469c9.tar.gz
noscript-cae465b19c6c03ecfa7de78af5d8b9cc7ff469c9.tar.xz
noscript-cae465b19c6c03ecfa7de78af5d8b9cc7ff469c9.zip
Fix incorrect console reporting from paste sanitization.
-rw-r--r--src/content/sanitizePaste.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/content/sanitizePaste.js b/src/content/sanitizePaste.js
index a1bcf53..bf42755 100644
--- a/src/content/sanitizePaste.js
+++ b/src/content/sanitizePaste.js
@@ -14,7 +14,6 @@
}
if (!editing) return;
- let html = container.innerHTML;
// we won't touch DOM elements which are already there
let oldNodes = new Set(container.querySelectorAll(selector + ",form"));
window.setTimeout(() => {
@@ -22,9 +21,10 @@
// or drop job, rather than replacing it, in order to avoid interferences
// with built-in sanitization
try {
+ let html = container.innerHTML;
if (sanitizeExtras(container, oldNodes)) {
- let t = e.type;
- console.log(`[NoScript] Sanitized\n<${t}>\n${html}\n</${t}>to\n<${t}>\n${container.innerHTML}\n</${t}>`, container);
+ let t = e.type.toUpperCase();
+ console.log(`[NoScript] Sanitized\n<${t}>\n${html}\n</${t}>\nto\n<${t}>\n${container.innerHTML}\n</${t}>`, container);
}
} catch(ex) {
console.log(ex);