From cae465b19c6c03ecfa7de78af5d8b9cc7ff469c9 Mon Sep 17 00:00:00 2001 From: hackademix Date: Thu, 25 Jul 2019 15:14:23 +0200 Subject: Fix incorrect console reporting from paste sanitization. --- src/content/sanitizePaste.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/content') 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}\nto\n<${t}>\n${container.innerHTML}\n`, container); + let t = e.type.toUpperCase(); + console.log(`[NoScript] Sanitized\n<${t}>\n${html}\n\nto\n<${t}>\n${container.innerHTML}\n`, container); } } catch(ex) { console.log(ex); -- cgit v1.2.3