mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
unescape HTML before downloading images, #4566
This commit is contained in:
parent
894b08a1b8
commit
ee608fcf46
@ -519,7 +519,7 @@ function downloadImages(noteId, content) {
|
||||
let imageMatch;
|
||||
|
||||
while (imageMatch = imageRe.exec(content)) {
|
||||
const url = imageMatch[1];
|
||||
let url = imageMatch[1];
|
||||
const inlineImageMatch = /^data:image\/[a-z]+;base64,/.exec(url);
|
||||
|
||||
if (inlineImageMatch) {
|
||||
@ -541,6 +541,8 @@ function downloadImages(noteId, content) {
|
||||
continue;
|
||||
}
|
||||
|
||||
url = utils.unescapeHtml(url);
|
||||
|
||||
if (url in imageUrlToAttachmentIdMapping) {
|
||||
const attachment = becca.getAttachment(imageUrlToAttachmentIdMapping[url]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user