Merge pull request #1453 from Bugagazavr/dot-names-gitlab-fix

Dot names fix
This commit is contained in:
Brad Rydzewski 2016-02-05 16:10:28 -08:00
commit b382b6d4e5

View file

@ -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