jesseduffield / jesseduffield/lazygit
Special characters not escaped when copying PR link
- Dominant language
- Go
- Stars
- 82.4k
- Forks
- 3k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 19
Description
**Describe the bug**
When a branch has a special character in it (`#` in my case) and I copy the url to create a pull request using `ctrl-y`, the special character is not escaped (stays, `#` instead of being converted to `%23`).
**To Reproduce**
Steps to reproduce the behavior:
1. Clone any github repository (I did not test other providers)
2. Create a local branch including `#` in its name, e.g. `fix/#1`
3. Push your branch to the remote
4. Try to copy the link to open a PR for that branch using `ctrl-y`
**Expected behavior**
I would expect the copied link to escape `#` to `%23`.
**Desktop (please complete the following information):**
- OS: Ubuntu
- Lazygit Version: **0.32.2**
**Additional context**
Note that when pushing the branch to the remote, the command log shows:
```
Git output:
remote:
remote: Create a pull request for 'fix/#1' on GitHub by visiting:
remote: https://github.com/user/repo/pull/new/fix/%234
remote:
To github.com:user/repo.git
* [new branch] fix/#4 -> fix/#4
```
Which is the correct URL to use when creating a pull request.
Contributor guide
Assessment
This issue has not been assessed yet.