Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

"#" In image path – breaks image preview #568

Open
1 task done
retromore opened this issue Jul 16, 2019 · 2 comments
Open
1 task done

"#" In image path – breaks image preview #568

retromore opened this issue Jul 16, 2019 · 2 comments

Comments

@retromore
Copy link

Prerequisites

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?

@rsese
Copy link

rsese commented Jul 18, 2019

Thanks for the report -

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)

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).

@retromore
Copy link
Author

retromore commented Jul 19, 2019

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants