unescape HTML before downloading images, #4566

This commit is contained in:
zadam 2024-01-08 00:03:11 +01:00
parent 894b08a1b8
commit ee608fcf46

View File

@ -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]);