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

vscode.Uri.parse is double encoding certain characters #81398

Closed
TylerLeonhardt opened this issue Sep 24, 2019 · 4 comments
Closed

vscode.Uri.parse is double encoding certain characters #81398

TylerLeonhardt opened this issue Sep 24, 2019 · 4 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) uri

Comments

@TylerLeonhardt
Copy link
Member

Version: 1.39.0-insider
Commit: de03947
Date: 2019-09-23T08:23:12.535Z
Electron: 6.0.9
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Darwin x64 18.7.0

Steps to Reproduce:

const body = "[README](https://github.com/PowerShell/vscode-powershell#reporting-problems)";
const encodedBody = encodeURIComponent(body);
const fullUrl = `https://github.com/PowerShell/vscode-powershell/issues/new?body=${encodedBody}`;
vscode.commands.executeCommand("vscode.open", vscode.Uri.parse(fullUrl));

You'll notice in your browser that the url will not have a correctly un-encoded pound (#) sign.
For example:

https://github.com/PowerShell/vscode-powershell/issues/new?body=%5BREADME%5D(https://github.com/PowerShell/vscode-powershell%2523reporting-problems)

Notice the %2523. There's some double encoding happening.

@jrieken
Copy link
Member

jrieken commented Sep 30, 2019

/duplicate of

@vscodebot vscodebot bot added the *duplicate Issue identified as a duplicate of another issue(s) label Sep 30, 2019
@jrieken
Copy link
Member

jrieken commented Sep 30, 2019

/duplicate of #25852

@vscodebot
Copy link

vscodebot bot commented Sep 30, 2019

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Sep 30, 2019
@TylerLeonhardt
Copy link
Member Author

Can you explain why this issue is a duplicate of that?

My issue is with escaping of characters that shouldn't be escaped. The issue you linked seems to be about unescaping.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) uri
Projects
None yet
Development

No branches or pull requests

2 participants