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

Fix: Encode paths as URI components when opening a folder or workspace #182398

Merged
merged 2 commits into from May 15, 2023

Conversation

dyedgreen
Copy link
Contributor

Closes #182397

Encode folder paths as URI components, so that special characters like + are intepreted correctly. This change carves out a special case for / characters, which would be encoded as %2F to retain more pretty URIs.

This should prevent issues when trying to open folder paths that contain
special characters like `+` or `&`.
@dyedgreen
Copy link
Contributor Author

I'm not fully sure how to best add an automated test for this change, can you point me to some existing tests I could extend / use as a starting point?

@dyedgreen dyedgreen changed the title Encode paths as URI components when opening a folder or workspace Fix: Encode paths as URI components when opening a folder or workspace May 13, 2023
@bpasero bpasero self-requested a review May 15, 2023 07:37
Copy link
Member

@bpasero bpasero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, pushed a 💄 We have no tests in that area.

@bpasero bpasero added this to the May 2023 milestone May 15, 2023
@bpasero bpasero marked this pull request as ready for review May 15, 2023 07:38
@bpasero bpasero enabled auto-merge (squash) May 15, 2023 07:38
@bpasero bpasero merged commit 29bf616 into microsoft:main May 15, 2023
6 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jun 29, 2023
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.

When opening a folder using VSCode server, paths containing special characters are misinterpreted
4 participants