Skip to content

Prevent aggressive image name encoding#96935

Merged
mjbvz merged 2 commits intomicrosoft:masterfrom
ChrisPapp:image_name_encoding
May 11, 2020
Merged

Prevent aggressive image name encoding#96935
mjbvz merged 2 commits intomicrosoft:masterfrom
ChrisPapp:image_name_encoding

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.

ChrisPapp added 2 commits May 4, 2020 20:06
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