When I am creating a link to a file, the link only works properly if the filename contains no spaces (usually create this link by dragging the file from Finder/Path Finder). That is all the characters up to the first space are turned into a hyperlink, the rest is ignored.
Apologies if this not the correct terminology. The following image shows the effect of a file with and without spaces:
One way of getting a url-encoded path is to select one or more files in a Finder.app window, and copy encoded versions of their paths to the clipboard by running the following JavaScript for Automation script, either from Script Editor (Yosemite onwards) or from something like FastScripts or Keyboard Maestro.
ļ¼Note, incidentally that if you have any non Anglo characters in the file name, they will also be encoded numerically, so for example, the file selected here,
might have a clickable encoded path in TaskPaper which looked something like:
The escape sequence depends on the link typeā¦ if you are doing a URL link (file://ā¦) then you need to escape spaces with %20. On the other hand if you are doing a āTaskPaper magic recognize path linkā then you need to use \ to escape the spaces. For examples:
I think I just found the bug. Right now it only works if you escape one spaceā¦ but if the path has more then one space it wonāt open the file and youāll see that dialog. Iāve just fixed for the next release.