summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorDavid Mehren2021-02-13 17:54:38 +0100
committerDavid Mehren2021-02-16 22:06:45 +0100
commit0f7f11e4f3c2bbae78705f2e5c71faa51556e016 (patch)
treec46e83609bfecfdb28007fae1c878db365a33613 /public
parent27ffe2515bd3d4bc9c604c2d32598f248909fefe (diff)
Fix HTML clipboard import
jQuery's .html() method escapes contained text (e.g. '<' becomes '&lt;'). This confuses the turndown parser, which then only performs unescaping, but does not convert to markdown. By using .text() instead, the unescaped content is returned and turndown can correctly generate markdown. Signed-off-by: David Mehren <git@herrmehren.de>
Diffstat (limited to 'public')
-rw-r--r--public/js/index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/public/js/index.js b/public/js/index.js
index 03cae1b4..510b6751 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -1583,7 +1583,7 @@ $('#clipboardModalClear').click(function () {
$('#clipboardModalContent').html('')
})
$('#clipboardModalConfirm').click(function () {
- const data = $('#clipboardModalContent').html()
+ const data = $('#clipboardModalContent').text()
if (data) {
parseToEditor(data)
$('#clipboardModal').modal('hide')