1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-06 03:53:59 +02:00

add URL encoding in pull request branch names

This commit is contained in:
Mikael Elkiaer 2022-01-10 20:13:38 +01:00 committed by Jesse Duffield
parent b70075eba6
commit ae18ad5b66

View File

@ -4,6 +4,7 @@ import (
"fmt"
"regexp"
"strings"
"net/url"
"github.com/go-errors/errors"
"github.com/jesseduffield/lazygit/pkg/i18n"
@ -42,9 +43,9 @@ func (self *HostingServiceMgr) GetPullRequestURL(from string, to string) (string
}
if to == "" {
return gitService.getPullRequestURLIntoDefaultBranch(from), nil
return gitService.getPullRequestURLIntoDefaultBranch(url.QueryEscape(from)), nil
} else {
return gitService.getPullRequestURLIntoTargetBranch(from, to), nil
return gitService.getPullRequestURLIntoTargetBranch(url.QueryEscape(from), url.QueryEscape(to)), nil
}
}