You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-29 22:48:10 +02:00
Desktop: Fix images fail to render in the preview pane for HTML notes (#10806)
This commit is contained in:
@@ -92,7 +92,7 @@ export default class HtmlToHtml implements MarkupRenderer {
|
||||
...options,
|
||||
};
|
||||
|
||||
const cacheKey = md5(escape(JSON.stringify({ markup, options })));
|
||||
const cacheKey = md5(escape(JSON.stringify({ markup, options, baseUrl: this.resourceBaseUrl_ })));
|
||||
let html = this.cache_.value(cacheKey);
|
||||
|
||||
if (!html) {
|
||||
@@ -100,11 +100,10 @@ export default class HtmlToHtml implements MarkupRenderer {
|
||||
allowedFilePrefixes: options.allowedFilePrefixes,
|
||||
});
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
html = htmlUtils.processImageTags(html, (data: any) => {
|
||||
html = htmlUtils.processImageTags(html, (data) => {
|
||||
if (!data.src) return null;
|
||||
|
||||
const r = utils.imageReplacement(this.ResourceModel_, data.src, options.resources, this.resourceBaseUrl_, options.itemIdToUrl);
|
||||
const r = utils.imageReplacement(this.ResourceModel_, data, options.resources, this.resourceBaseUrl_, options.itemIdToUrl);
|
||||
if (!r) return null;
|
||||
|
||||
if (typeof r === 'string') {
|
||||
|
||||
Reference in New Issue
Block a user