Skip to content

Commit

Permalink
Update URL checking
Browse files Browse the repository at this point in the history
  • Loading branch information
Skalakid committed Oct 3, 2024
1 parent 413b264 commit 2bcd4fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/web/inputElements/inlineImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 2bcd4fa

Please sign in to comment.