From f37621dd27c2d2ac8c2643538745d709ff71379b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Moreno?= Date: Mon, 18 Dec 2023 15:41:04 +0100 Subject: [PATCH] fixes #322 (#924) --- src/package.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/package.ts b/src/package.ts index fc5ff9c8..00780266 100644 --- a/src/package.ts +++ b/src/package.ts @@ -779,7 +779,7 @@ export abstract class MarkdownProcessor extends BaseProcessor { // Replace links with urls contents = contents.replace(/<(?:img|video)[^>]+src=["']([/.\w\s#-]+)['"][^>]*>/gm, (all, link) => { - const isLinkRelative = !/^\w+:\/\//.test(link) && link[0] !== '#'; + const isLinkRelative = !/^\w+:\/\//.test(link) && link[0] !== '#' && !link.startsWith('data:'); if (!this.baseImagesUrl && isLinkRelative) { throw new Error(