"#" In image path – breaks image preview
retromore opened this issue · 2 comments
Prerequisites
- Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: https://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: https://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
When path to an image contains '#' – the image in not rendered in preview.
Failed to load resource: net::ERR_FILE_NOT_FOUND
/C:/Users/name/Desktop/md/#img\my_image.png
The md looks like this: ![alt-text](#img/my_image.png)
It might be even: ![alt-text](img/my_image.png)
but if '#' is present somewhere in the path, the image gets lost on the way.
for example: /C:/Users/name/Desktop/#some_path/md/img\my_image.png
Steps to Reproduce
Insert an image with path containing '#'
Expected behavior:
The image should show up in preview
Actual behavior:
The image does not show up
Reproduces how often:
Always
Versions
1.38.2 x64
Windows 8.1
Additional Information
Might be related to #505?
Thanks for the report -
Failed to load resource: net::ERR_FILE_NOT_FOUND
/C:/Users/name/Desktop/md/#img\my_image.pngThe md looks like this:
![alt-text](#img/my_image.png)
Just to clarify, you have a directory called #img
? If you encode the #
with %23
does that work? E.g. ![alt-text](%23img/my_image.png)
.
If you encode the # with %23 does that work?
Ah, yes, encoding it this way actually works.
But I noticed it when '#' was outside my relative path. My link simply was img/my_img.png
So in order to make it work I'd have insert something like /C:/Users/name/Desktop/%23some_path/md/img\my_image.png
– which is messy and inconvenient and will break if I move my directory elsewhere.
Is it still a bug?