Skip to content

Commit ee608fc

Browse files
committed
unescape HTML before downloading images, #4566
1 parent 894b08a commit ee608fc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/services/notes.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ function downloadImages(noteId, content) {
519519
let imageMatch;
520520

521521
while (imageMatch = imageRe.exec(content)) {
522-
const url = imageMatch[1];
522+
let url = imageMatch[1];
523523
const inlineImageMatch = /^data:image\/[a-z]+;base64,/.exec(url);
524524

525525
if (inlineImageMatch) {
@@ -541,6 +541,8 @@ function downloadImages(noteId, content) {
541541
continue;
542542
}
543543

544+
url = utils.unescapeHtml(url);
545+
544546
if (url in imageUrlToAttachmentIdMapping) {
545547
const attachment = becca.getAttachment(imageUrlToAttachmentIdMapping[url]);
546548

0 commit comments

Comments
 (0)