From 0cf15a36c605816c029e85bfc6439700d090fcc7 Mon Sep 17 00:00:00 2001 From: Benoit Schweblin Date: Fri, 30 Mar 2018 16:07:52 +0100 Subject: [PATCH] Fixed escaped chars on paste --- src/components/modals/AboutModal.vue | 2 ++ src/services/cledit/cleditCore.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/modals/AboutModal.vue b/src/components/modals/AboutModal.vue index 3a1e393b..264fc73a 100644 --- a/src/components/modals/AboutModal.vue +++ b/src/components/modals/AboutModal.vue @@ -14,6 +14,8 @@
Community
+ For commercial support and custom development, please contact us. +

FAQ


diff --git a/src/services/cledit/cleditCore.js b/src/services/cledit/cleditCore.js index 7f724832..d3098eb9 100644 --- a/src/services/cledit/cleditCore.js +++ b/src/services/cledit/cleditCore.js @@ -333,6 +333,7 @@ function cledit(contentElt, scrollEltOpt) { }); const turndownService = new TurndownService(store.getters['data/computedSettings'].turndown); + turndownService.escape = str => str; // Disable escaping contentElt.addEventListener('paste', (evt) => { undoMgr.setCurrentMode('single'); @@ -343,7 +344,7 @@ function cledit(contentElt, scrollEltOpt) { data = clipboardData.getData('text/plain'); try { const html = clipboardData.getData('text/html'); - if (html && !clipboardData.getData('text/css')) { + if (html) { const sanitizedHtml = htmlSanitizer.sanitizeHtml(html) .replace(/ /g, ' '); // Replace non-breaking spaces with classic spaces if (sanitizedHtml) {