Describe the bug
When creating a PR in the browser, gh pr create prints a display URL based on the parsed URL path. For branch names that require URL encoding (for example, quotes), the displayed URL is unescaped and can be invalid.
Affected version
2.85.0
Steps to reproduce the behavior
- Create and checkout a branch named
test-"quoted"-branch-pr.
- Run
gh pr create --web and proceed with the “continue in browser” flow.
- Observe the displayed URL in the terminal.
Expected vs actual behavior
Expected: the display URL preserves percent-encoding, for example: https://github.com/OWNER/REPO/compare/...test-%22quoted%22-branch-pr
Actual: the display URL is unescaped, for example: https://github.com/OWNER/REPO/compare/...test-"quoted"-branch-pr
Describe the bug
When creating a PR in the browser,
gh pr createprints a display URL based on the parsed URL path. For branch names that require URL encoding (for example, quotes), the displayed URL is unescaped and can be invalid.Affected version
2.85.0
Steps to reproduce the behavior
test-"quoted"-branch-pr.gh pr create --weband proceed with the “continue in browser” flow.Expected vs actual behavior
Expected: the display URL preserves percent-encoding, for example:
https://github.com/OWNER/REPO/compare/...test-%22quoted%22-branch-prActual: the display URL is unescaped, for example:
https://github.com/OWNER/REPO/compare/...test-"quoted"-branch-pr