summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
Diffstat (limited to 'routers')
-rw-r--r--routers/web/repo/badges/badges.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/web/repo/badges/badges.go b/routers/web/repo/badges/badges.go
index 7f4549d606..ed40e982a1 100644
--- a/routers/web/repo/badges/badges.go
+++ b/routers/web/repo/badges/badges.go
@@ -18,8 +18,8 @@ import (
func getBadgeURL(ctx *context_module.Context, label, text, color string) string {
sb := &strings.Builder{}
_ = setting.Badges.GeneratorURLTemplateTemplate.Execute(sb, map[string]string{
- "label": url.PathEscape(label),
- "text": url.PathEscape(text),
+ "label": url.PathEscape(strings.ReplaceAll(label, "-", "--")),
+ "text": url.PathEscape(strings.ReplaceAll(text, "-", "--")),
"color": url.PathEscape(color),
})