glab icon indicating copy to clipboard operation
glab copied to clipboard

Missing URL-encoding for branches.

Open clemsbot opened this issue 4 years ago • 1 comments

By kaHaleMaKai,


Description

When on a branch that includes character that require url-encoding, they don't get encoded when opening the repo in a browser.

Expected Behavior vs Actual Behavior

E.g. on a branch like #1-this-is-my-first-issue the opened url should be something like

https://GITLAB_URL/NS/PROJECT/-/tree/%231-my-first-issue

Instead, the browser opens the un-encoded url

https://GITLAB_URL/NS/PROJECT/-/tree/#1-my-first-issue

and fails.

Possible Fix Url-encode the branch name. I haven't checked whether this also applies to issue names, mrs etc.

Steps to Reproduce

  1. cd into a git repo.
  2. Create a branch that includes a character that needs url-encoding such as #.
  3. Run glab repo view --web.
  4. See error

Logs

no logs

Your Environment

  • Version used (Run glab --version): 1.21.1 (2021-09-28)
  • Operating System and version: debian testing/bookworm

Last updated: 2022-01-31T20:01:20.065Z

https://gitlab.com/profclems/glab/-/issues/279

clemsbot avatar Jan 31 '22 20:01 clemsbot

This issue has been automatically marked as stale because it has not had recent activity. We haven't had the time to address it yet, but we want to keep it open. This message is just a reminder for us to help triage issues.

clemsbot avatar Mar 03 '22 02:03 clemsbot