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 spaces in name do not render #2152

Open
1 task done
sdaitzman opened this issue Jan 26, 2020 · 5 comments
Open
1 task done

Images with spaces in name do not render #2152

sdaitzman opened this issue Jan 26, 2020 · 5 comments
Labels
type: bug Something isn't working

Comments

@sdaitzman
Copy link

  • I confirm that this is an issue rather than a question.

Bug report

Images with spaces in name are not rendered at all.

Steps to reproduce

  1. Name an image with spaces in its name.
  2. Reference it in a Markdown file.

Here's the repo at the commit where the issue appears: https://github.com/sdaitzman/sam.daitzman.com/tree/dc79228452fd0bf8cd65f799ed3cf711ee32145a

And here's a commit where the issue has been resolved by removing spaces from the filename: sdaitzman/sam.daitzman.com@f25208b

What is expected?

The image appears.

What is actually happening?

The image does not appear.

Other relevant information

Related issue: markdown-it/markdown-it#428

  • Output of npx vuepress info in my VuePress project:
Environment Info:

  System:
    OS: macOS 10.15.2
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Binaries:
    Node: 12.14.1 - /usr/local/bin/node
    Yarn: 1.21.1 - /usr/local/bin/yarn
    npm: 6.13.4 - /usr/local/bin/npm
  Browsers:
    Chrome: 78.0.3904.97
    Firefox: 72.0.2
    Safari: 13.0.4
  npmPackages:
    @vuepress/core:  1.2.0 
    @vuepress/theme-default:  1.2.0 
    vuepress: ^1.2.0 => 1.2.0 
  npmGlobalPackages:
    vuepress: Not Found
@billyyyyy3320
Copy link
Collaborator

URL with spaces is not valid because that's for setting link title attribute.

@sdaitzman
Copy link
Author

That totally makes sense, and I'm aware it violates the Markdown spec. But in terms of allowing user-submitted images (like supporting the blog plugin, for example) it's a pretty big issue.

@billyyyyy3320 billyyyyy3320 added the type: bug Something isn't working label Jan 27, 2020
@billyyyyy3320
Copy link
Collaborator

I thought it should work fine with %20, but it turns out I'm wrong. So, right, it's an issue.

@jimarick
Copy link

Also interested in this being resolved. I am exporting lots of .md files from a notes app onto vuepress site, and all the spaces in image names are replaced with %20, but none of the images render.

@sdaitzman
Copy link
Author

Bumping this since it's ~2yrs later and I just ran into the same bug again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants