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

Images with colons in their name not displayed #1182

Open
Pistahh opened this issue Dec 12, 2024 · 1 comment · May be fixed by #1186
Open

Images with colons in their name not displayed #1182

Pistahh opened this issue Dec 12, 2024 · 1 comment · May be fixed by #1186
Labels
bug Something isn't working help wanted If you're willing to help, do!

Comments

@Pistahh
Copy link

Pistahh commented Dec 12, 2024

  1. In Windows I select a png file in the file manager and Copy it using context menu
  2. I paste it into Silverbullet (shift-insert)
  3. silverbullet asks for a filename
  4. if i keep the filename as-is, the image appears. But if I change the filename and it includes a colon (:) in the filename, the link for the image is inserted into the document correctly, but the image is not displayed.

image
image

@zefhemel zefhemel added bug Something isn't working help wanted If you're willing to help, do! labels Dec 14, 2024
Pistahh added a commit to Pistahh/silverbullet that referenced this issue Dec 16, 2024
Inline content with the file containing e.g. a `:` cannot be displayed
as the file name is set as the img src, and the browser treats the part
before the : as the protocol, instead of as a file name.

This change encodes the file name so `:` becomes `%3A`, fixing the
issue.

Fixes silverbulletmd#1182.
@Pistahh Pistahh linked a pull request Dec 16, 2024 that will close this issue
@Pistahh
Copy link
Author

Pistahh commented Dec 16, 2024

#1186 fixes this. I'm not sure though if it breaks anything else or not :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted If you're willing to help, do!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants