Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix importing inline images within markdown within zip, closes #4301
zadam9665e872c271
diff --git a/src/services/import/zip.js b/src/services/import/zip.jsindex 010a103463..fcdb0cb5b5 100644--- a/src/services/import/zip.js+++ b/src/services/import/zip.js@@ -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) {