Code added to HTML in WYSIWYG editor
Hi there Ben,
I recently encountered an issue where if I edit my html for the email in something like notepad++ and then paste it into the editor in sendy, it is adding some additional code. I have the editor switched to source mode, when I do this, but if you go back to the editor at any point (From the edit newsletter link) it appears the editor turns source mode back over to WYSIWYG, then inserts the following code to the email itself.
try { Object.defineProperty(screen, "availTop", { value: 0 }); } catch (e) {} try { Object.defineProperty(screen, "availLeft", { value: 0 }); } catch (e) {} try { Object.defineProperty(screen, "availWidth", { value: 1920 }); } catch (e) {} try { Object.defineProperty(screen, "availHeight", { value: 1080 }); } catch (e) {} try { Object.defineProperty(screen, "colorDepth", { value: 24 }); } catch (e) {} try { Object.defineProperty(screen, "pixelDepth", { value: 24 }); } catch (e) {} try { Object.defineProperty(navigator, "hardwareConcurrency", { value: 8 }); } catch (e) {} try { Object.defineProperty(navigator, "webkitTemporaryStorage", { value: undefined }); } catch (e) {} try { Object.defineProperty(navigator, "webkitPersistentStorage", { value: undefined }); } catch (e) {} try { Object.defineProperty(navigator, "appVersion", { value: "5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36" }); } catch (e) {} try { Object.defineProperty(navigator, "doNotTrack", { value: null }); } catch (e) {} navigator.getBattery = function getBattery () { let battery = {"charging":true,"chargingTime":0,"dischargingTime":null,"level":1} try { Object.defineProperty(battery, 'onchargingchange', { enumerable: true, configurable: false, writable: false, value: undefined }) } catch (e) {} try { Object.defineProperty(battery, 'onchargingtimechange', { enumerable: true, configurable: false, writable: false, value: undefined }) } catch (e) {} try { Object.defineProperty(battery, 'ondischargingtimechange', { enumerable: true, configurable: false, writable: false, value: undefined }) } catch (e) {} try { Object.defineProperty(battery, 'onlevelchange', { enumerable: true, configurable: false, writable: false, value: undefined }) } catch (e) {} battery.addEventListener = function addEventListener () { return } return Promise.resolve(battery) } try { window.screenY = 0 } catch (e) { } try { window.screenTop = 0 } catch (e) { } try { window.top.window.outerHeight = window.screen.height } catch (e) { } try { window.screenX = 0 } catch (e) { } try { window.screenLeft = 0 } catch (e) { } try { window.top.window.outerWidth = window.screen.width } catch (e) { }This discussion has been closed.
Comments
Hi,
One of your browser extension is inserting code into the WYSIWYG editor when you were editing your email campaign (for example, ‘Grammarly’, ‘Ad Blocker Ultimate’, 'Adguard Adblocker', ‘MetaMask‘ etc browser extensions are known to do just that).
If the issue goes away, you’d need to track down this browser extension that inserts code into the WYSIWYG editor when you were creating/editing your campaign and disable it.
Thanks.
Best regards,
Ben
It appears that it was the DuckDuckGo privacy extension that was causing this. Thanks for pointing me in the right direction.