From 2bcd4fa29ffb539e02dd190c2f9088760d9d2128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ska=C5=82ka?= Date: Thu, 3 Oct 2024 16:54:35 +0200 Subject: [PATCH] Update URL checking --- src/web/inputElements/inlineImage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/web/inputElements/inlineImage.ts b/src/web/inputElements/inlineImage.ts index f97a1ef0..d894e557 100644 --- a/src/web/inputElements/inlineImage.ts +++ b/src/web/inputElements/inlineImage.ts @@ -154,7 +154,7 @@ function addInlineImagePreview( let imageHref = ''; if (linkRange) { imageHref = text.substring(linkRange.start, linkRange.start + linkRange.length); - if (addAuthTokenToImageURLCallback && imagePreviewAuthRequiredURLs && imagePreviewAuthRequiredURLs.find((url) => imageHref.includes(url))) { + if (addAuthTokenToImageURLCallback && imagePreviewAuthRequiredURLs && imagePreviewAuthRequiredURLs.find((url) => imageHref.startsWith(url))) { imageHref = addAuthTokenToImageURLCallback(imageHref); } }