From f9d729012c9d6f2cb04aae4d86af86c5b188a150 Mon Sep 17 00:00:00 2001 From: Sebastian Rettig Date: Tue, 13 Jul 2021 07:48:15 +0200 Subject: [PATCH] fix(h5p-exporter): already internalized URLs are kept as they are --- packages/h5p-html-exporter/src/HtmlExporter.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/h5p-html-exporter/src/HtmlExporter.ts b/packages/h5p-html-exporter/src/HtmlExporter.ts index 8f7354c79..dee7674bc 100644 --- a/packages/h5p-html-exporter/src/HtmlExporter.ts +++ b/packages/h5p-html-exporter/src/HtmlExporter.ts @@ -728,6 +728,10 @@ export default class HtmlExporter { core: boolean, usedFiles: LibrariesFilesList ) => async (asset) => { + // If a url already is internalized we simply return it + if (asset.url.startsWith('data:') && asset.url.includes('base64')) { + return asset.url; + } const mimetype = mimetypes.lookup(path.extname(asset.relativePath)); if (library) {