You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-18 23:07:45 +02:00
Desktop: Resolves #3333: Improved escaping of Markdown titles in links
This commit is contained in:
@ -211,7 +211,7 @@ function shimInit() {
|
||||
}, options);
|
||||
|
||||
const { basename } = require('path');
|
||||
const { escapeLinkText } = require('lib/markdownUtils');
|
||||
const { escapeTitleText } = require('lib/markdownUtils');
|
||||
const { toFileProtocolPath } = require('lib/path-utils');
|
||||
|
||||
let resource = null;
|
||||
@ -231,7 +231,7 @@ function shimInit() {
|
||||
if (!options.createFileURL) {
|
||||
newBody.push(Resource.markdownTag(resource));
|
||||
} else {
|
||||
const filename = escapeLinkText(basename(filePath)); // to get same filename as standard drag and drop
|
||||
const filename = escapeTitleText(basename(filePath)); // to get same filename as standard drag and drop
|
||||
const fileURL = `[${filename}](${toFileProtocolPath(filePath)})`;
|
||||
newBody.push(fileURL);
|
||||
}
|
||||
|
Reference in New Issue
Block a user