mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-23 10:21:00 +00:00
Dot names fix
This commit is contained in:
parent
c064f37867
commit
1f9516a385
1 changed files with 11 additions and 1 deletions
|
@ -5,8 +5,18 @@ import (
|
|||
"strings"
|
||||
)
|
||||
|
||||
var encodeMap = map[string]string{
|
||||
".": "%252E",
|
||||
}
|
||||
|
||||
func encodeParameter(value string) string {
|
||||
return strings.Replace(url.QueryEscape(value), "/", "%2F", 0)
|
||||
value = url.QueryEscape(value)
|
||||
|
||||
for before, after := range encodeMap {
|
||||
value = strings.Replace(value, before, after, -1)
|
||||
}
|
||||
|
||||
return value
|
||||
}
|
||||
|
||||
// Tag returns current tag for push event hook payload
|
||||
|
|
Loading…
Reference in a new issue