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

Desktop: Fixed attaching local files that contain spaces in path

Ref: https://discourse.joplinapp.org/t/a-minor-bug-on-linking-to-local-files/13654
This commit is contained in:
Laurent Cozic
2021-01-08 18:33:22 +00:00
parent 0bf3531f51
commit d75adc3740
4 changed files with 6 additions and 11 deletions

View File

@ -121,7 +121,6 @@ export function toFileProtocolPath(filePathEncode: string, os: string = null) {
filePathEncode = encodeURI(filePathEncode);
filePathEncode = filePathEncode.replace(/\+/g, '%2B'); // escape '+' with unicode
filePathEncode = filePathEncode.replace(/%20/g, '+'); // switch space (%20) with '+'. To comply with syntax used by joplin, see urldecode_(str) in MdToHtml.js
return `file://${filePathEncode.replace(/\'/g, '%27')}`; // escape '(single quote) with unicode, to prevent crashing the html view
}