1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Desktop: Fixes #3267: Fixed issue with invalid image paths when config path contains spaces

This commit is contained in:
Laurent Cozic
2020-05-25 09:52:10 +01:00
parent b126c761cd
commit 8c338675d2
4 changed files with 17 additions and 3 deletions

View File

@ -149,7 +149,7 @@ class Note extends BaseItem {
const resource = await Resource.load(id);
if (!resource) continue;
const resourcePath = options.useAbsolutePaths ? `file://${Resource.fullPath(resource)}` : Resource.relativePath(resource);
body = body.replace(new RegExp(`:/${id}`, 'gi'), resourcePath);
body = body.replace(new RegExp(`:/${id}`, 'gi'), markdownUtils.escapeLinkUrl(resourcePath));
}
this.logger().info('replaceResourceInternalToExternalLinks result', body);