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>
This commit is contained in:
David Mehren 2021-02-13 17:54:38 +01:00
parent 27ffe2515b
commit 0f7f11e4f3
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3

View file

@ -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')