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

[Bug] absolute paths not resolved under windows #515

Closed
jean-emmanuel opened this issue Apr 14, 2019 · 4 comments

Comments

Projects
None yet
2 participants
@jean-emmanuel
Copy link
Owner

commented Apr 14, 2019

This applies to all css url() calls and affects the image widget.

  • solution: escape : and \
  • question: should paths be resolved relatively to remote-root ?

jean-emmanuel added a commit that referenced this issue Apr 16, 2019

jean-emmanuel added a commit that referenced this issue Apr 16, 2019

@jean-emmanuel

This comment has been minimized.

Copy link
Owner Author

commented Apr 16, 2019

solution: escape : and \

done

question: should paths be resolved relatively to remote-root ?

Soft fix: only images can be served this way, other filetypes are forbidden.

@GeneralMidi

This comment has been minimized.

Copy link

commented Apr 18, 2019

If you accidently add single quotes around the path, some definite funkyness occurs! Edit: double quotes too!

e.g. In value for img widget
'C:\test.jpg'

@jean-emmanuel

This comment has been minimized.

Copy link
Owner Author

commented Apr 18, 2019

Hmm it's a subtle bug that's not related to this issue, I'll dig this.

@jean-emmanuel

This comment has been minimized.

Copy link
Owner Author

commented Apr 19, 2019

This happens because the backslash is an escape character. I fixed it for single strings only, not in arrays or objects, if you need to write windows path in arrays/objects, either use double backslashes (\) or regular slashes (/) as separators.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.