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

"Copy Remote File Url" url-encodes the URL #1202

Closed
borekb opened this issue Nov 23, 2020 · 10 comments
Closed

"Copy Remote File Url" url-encodes the URL #1202

borekb opened this issue Nov 23, 2020 · 10 comments
Assignees
Labels
bug Something isn't working verified Indicates that the issue has been community verified
Milestone

Comments

@borekb
Copy link

borekb commented Nov 23, 2020

  • GitLens Version: 11.0.4
  • VS Code version: Code 1.51.1 (e5a624b788d92b8d34d1392e4c4d9789406efe8f, 2020-11-11T01:11:34.018Z)
  • OS version: Darwin x64 20.1.0

Steps to Reproduce:

  1. Invoke the GitLens: Copy Remote File Url command.
  2. Paste to the browser, notice how it url-encoded the slashes (%2F instead of /)

I think this started happening with v11.0.0. The url-encoded version still works but is uglier, for example:

- https://github.com/user/repo/blob/512a30dc.../packages/src/lib/README.md
+ https://github.com/user/repo/blob/512a30dc.../packages%2Fsrc%2Flib%2FREADME.md
@borekb borekb added the potential-bug Seems like something isn't working label Nov 23, 2020
@ngtrunghuan
Copy link

This is causing a lot of issue for my firm's hosted bitbucket.

@borekb
Copy link
Author

borekb commented Nov 24, 2020

Workaround I use for now is to use the Open File on Remote command and copy the URL from the browser. That seems to avoid URL-encoding.

@eamodio
Copy link
Member

eamodio commented Nov 28, 2020

I added the encoding to deal with spaces in the file path (otherwise it would break the url). Maybe I just need to either encode just that, or just decode /.

@eamodio
Copy link
Member

eamodio commented Nov 28, 2020

Can you please verify this fix in the latest insiders version?

You can install the insiders version from here.

@eamodio eamodio added bug Something isn't working needs-verification Indicates a request for community verification and removed potential-bug Seems like something isn't working labels Nov 28, 2020
@eamodio eamodio self-assigned this Nov 28, 2020
@eamodio eamodio added this to the Soon™ milestone Nov 28, 2020
@eamodio eamodio reopened this Nov 29, 2020
@ThibaultJanBeyer
Copy link

Hmm, just installed the insider version. My URLs are still encoded:

https://stash.int.company.net/projects/company/repos/company-app/browse/services%2Fsome-service%2Fsrc%2Fapi%2Fadmin%2Ffoo%2Fget%2Findex.js?at=AM-632-post-internal-endpoint#3

expected:

https://stash.int.company.net/projects/company/repos/company-app/browse/services/some-service/src/api/admin/foo/get/index.js?at=AM-632-post-internal-endpoint#3

@ngtrunghuan
Copy link

ngtrunghuan commented Dec 1, 2020 via email

@eamodio
Copy link
Member

eamodio commented Dec 1, 2020

@ThibaultJanBeyer Are you sure you were testing on the latest insiders? I can't see how you'd get that type of encoding given the changes I've made.

@yrtimiD
Copy link
Contributor

yrtimiD commented Dec 3, 2020

confirm: insiders version fixes the escaping problem.

@eamodio eamodio added pending-release Indicates that the issue been resolved, but has not yet been released to the stable edition verified Indicates that the issue has been community verified and removed needs-verification Indicates a request for community verification labels Dec 4, 2020
@eamodio eamodio closed this as completed Dec 6, 2020
@ThibaultJanBeyer
Copy link

ThibaultJanBeyer commented Dec 8, 2020

@eamodio I uninstalled and re-installed the insiders version. Now the encoding seems correct. Thank you!

@eamodio eamodio removed the pending-release Indicates that the issue been resolved, but has not yet been released to the stable edition label Dec 24, 2020
@eamodio eamodio modified the milestones: Soon™, Shipped Dec 24, 2020
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working verified Indicates that the issue has been community verified
Projects
None yet
Development

No branches or pull requests

5 participants