Dot names fix

This commit is contained in:
Kirill Zaitsev 2016-02-02 01:11:27 +03:00
parent c064f37867
commit 1f9516a385

View file

@ -5,8 +5,18 @@ import (
"strings" "strings"
) )
var encodeMap = map[string]string{
".": "%252E",
}
func encodeParameter(value string) string { 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 // Tag returns current tag for push event hook payload