Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image preview not working when # in path #1068

Closed
mi-molette opened this issue Nov 9, 2023 · 1 comment
Closed

Image preview not working when # in path #1068

mi-molette opened this issue Nov 9, 2023 · 1 comment
Labels

Comments

@mi-molette
Copy link

I use Markdown 3.0.1.1
When the md and image files are store in a folder with "#" in the path preview does not work.
The image is correctly printed or embeded. But does not display in preview as show under

Image

Image

@mi-molette mi-molette changed the title Image preview not workin when # in path Image preview not working when # in path Nov 9, 2023
@RickStrahl RickStrahl added the bug label Nov 19, 2023
@RickStrahl
Copy link
Owner

Thanks for the report - I've fixed this issue which is due to the hash being invalid in a URL unless it's encoded. The base url is the problem but the same thing also applies for the other links in the page to script files and other resources.

Here's what this looks like now:

image

In this case the Markdown file lives in a folder like this:

image

where the folder includes a hash and a couple of other characters that can cause problems in a url.

Ironically full URL encoding for these paths doesn't work (ie. HttpUtility.UrlEncde()) as the encoded slashes do not work in the base and link urls, so I had create a custom encoder that only encodes the extended characters that break the file references.

It'll be in 3.1.6 in a few days.

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

No branches or pull requests

2 participants