fix importing inline images within markdown within zip, closes #4301

This commit is contained in:
zadam 2023-10-03 09:40:31 +02:00
parent 9db0a062ed
commit 9665e872c2

View file

@ -327,6 +327,11 @@ async function importZip(taskContext, fileBuffer, importRootNote) {
content = content.replace(/<\/body>.*<\/html>/gis, "");
content = content.replace(/src="([^"]*)"/g, (match, url) => {
if (url.startsWith("data:image")) {
// inline images are parsed and saved into attachments in the note service
return match;
}
try {
url = decodeURIComponent(url).trim();
} catch (e) {