Fixed escaped chars on paste
This commit is contained in:
parent
c67f2c88b9
commit
0cf15a36c6
@ -14,6 +14,8 @@
|
||||
<br>
|
||||
<a target="_blank" href="https://community.stackedit.io/">Community</a>
|
||||
<hr>
|
||||
For commercial support and custom development, please <a href="mailto:stackedit.project@gmail.com">contact us</a>.
|
||||
<hr>
|
||||
<h3>FAQ</h3>
|
||||
<div class="faq" v-html="faq"></div>
|
||||
<hr>
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user