diff options
author | David Mehren | 2021-02-13 17:54:38 +0100 |
---|---|---|
committer | David Mehren | 2021-02-16 22:06:45 +0100 |
commit | 0f7f11e4f3c2bbae78705f2e5c71faa51556e016 (patch) | |
tree | c46e83609bfecfdb28007fae1c878db365a33613 | |
parent | 27ffe2515bd3d4bc9c604c2d32598f248909fefe (diff) |
Fix HTML clipboard import
jQuery's .html() method escapes contained text (e.g. '<' becomes
'<'). 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>
-rw-r--r-- | public/js/index.js | 2 |
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') |