From 17373444801c501d8c672feafabfacdb74bf4640 Mon Sep 17 00:00:00 2001 From: kkapsner Date: Tue, 11 Jun 2019 23:09:13 +0200 Subject: [PATCH] document.write and document.writeln protection broke pages Fixes #365 --- lib/iframeProtection.js | 54 ++++++++++++++++++++++------------------- releaseNotes.txt | 1 + versions/updates.json | 4 +++ 3 files changed, 34 insertions(+), 25 deletions(-) diff --git a/lib/iframeProtection.js b/lib/iframeProtection.js index 6457747..383c2f1 100644 --- a/lib/iframeProtection.js +++ b/lib/iframeProtection.js @@ -159,20 +159,22 @@ "write" ); const documentWrite = documentWriteDescriptor.value; - documentWriteDescriptor.value = exportFunction(function write(str){ - str = "" + str; - // weird problem with waterfox and google docs - const parts = ( - str.match(/^\s*