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

Prevent aggressive image name encoding #96935

Merged
merged 2 commits into from
May 11, 2020

Conversation

ChrisPapp
Copy link
Contributor

@ChrisPapp ChrisPapp commented May 4, 2020

This PR fixes #96689

Following the discussion on the issue thread, I created this PR which prevents aggressive encoding of image names in the builtin image-preview extension. I don't know why it was set this way. In comparison, the markdown-language-features extension does not use it.

Anyway, disabling it seems to solve the issue.

Also, I fixed a typo in the same file.

Changes getWebiewContents to getWebviewContents in image-preview extension
@mjbvz
Copy link
Collaborator

mjbvz commented May 5, 2020

Thanks for taking a look.

Can you please also explain how you tested this change. Specifically, I want to make sure images with special characters in their paths (such as spaces) still work after this change

@ChrisPapp
Copy link
Contributor Author

ChrisPapp commented May 5, 2020

This is how I tested it:

Filename:
Test%41-fail.png
Fails on master, opens successfully on this branch.

Filename:
Test_ !@#%$^&()+success.jpg
Opens successfully both on master and this branch.

Should I create some kind of testing code for this?

@mjbvz mjbvz added this to the May 2020 milestone May 11, 2020
@mjbvz mjbvz merged commit 03beeec into microsoft:master May 11, 2020
@mjbvz
Copy link
Collaborator

mjbvz commented May 11, 2020

Thanks. Let's see if this causes any issue or other file paths out there

@github-actions github-actions bot locked and limited conversation to collaborators Jun 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to open image with URI encoded character in name
2 participants