From 1f9516a385e7ece242501b83902b9018a5497d21 Mon Sep 17 00:00:00 2001 From: Kirill Zaitsev Date: Tue, 2 Feb 2016 01:11:27 +0300 Subject: [PATCH] Dot names fix --- remote/gitlab/client/util.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/remote/gitlab/client/util.go b/remote/gitlab/client/util.go index 7cc5c37f4..c7418525b 100644 --- a/remote/gitlab/client/util.go +++ b/remote/gitlab/client/util.go @@ -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