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

wrong image file name convertion when there are spaces in file name #1562

Closed
dracodoc opened this issue Oct 23, 2015 · 3 comments
Closed

wrong image file name convertion when there are spaces in file name #1562

dracodoc opened this issue Oct 23, 2015 · 3 comments
Labels
bug Something isn't working enhancement New feature or request post-asset

Comments

@dracodoc
Copy link

I have a image file with spaces in name (they are generated from knitr automatically so it's unpractical for me to remove the space manually every time). I put the image file under the post asset folder, use this to refer the image in markdown file:

![plot of chunk Basic Module Detector Alert](Basic Module Detector Alert-1.png) 

After post generation, the html is referring the image like this:

<img src="Basic Module Detector Alert-1.png" alt="plot of chunk Basic Module Detector Alert"> 

But the image file in public folder was renamed with all spaces replaced by %20, thus the image cannot be displayed.

Either the image file should not be renamed, or the html should use renamed file name.

@leesei leesei added the bug Something isn't working label Nov 10, 2015
@Xuanwo
Copy link
Contributor

Xuanwo commented Dec 2, 2015

I think we should use renamed filename in html.

@leesei leesei added enhancement New feature or request and removed bug Something isn't working labels Feb 22, 2016
@leesei
Copy link
Member

leesei commented Feb 22, 2016

Global asset (/source/assets)

File was not renamed in public and can be accessed with src with space in link.

Although it works currently, we should ALWAYS urlescape links in HTML.

Post asset

Renaming the file (cat image.png -> cat%20image.png) make it accessible only with cat%2520image.png.
This renaming should not have done in the first place.

@leesei leesei added bug Something isn't working post-asset labels Feb 22, 2016
@leesei leesei closed this as completed in 4354260 Feb 23, 2016
@leesei
Copy link
Member

leesei commented Feb 23, 2016

Use {% asset_img "spaced asset" "spaced title" %} to access spaced asset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request post-asset
Projects
None yet
Development

No branches or pull requests

3 participants