When creating a link to a file with a `#` in the filename, the link gets
truncated. This happens because the filename is eventaully passed to
`url.Parse` which (correctly!) interprets the `#` as fragment separator.
This commit escapes the `#` in the filename before creating the link.
Fixes#4926Fixes#8232Fixes#12342
Co-authored-by: Joe Mooring <joe.mooring@veriphor.com>