1
0
mirror of https://github.com/TwiN/gatus.git synced 2026-02-15 05:05:05 +00:00

fix(key): Support (, ), + and & as name/group (#1340)

fix(key): Support (, ), + and & as name/group

Relevant: #1339
This commit is contained in:
TwiN
2025-10-16 16:47:11 -04:00
committed by GitHub
parent 39981de54b
commit ebd4068aac
3 changed files with 28 additions and 9 deletions

View File

@@ -15,5 +15,9 @@ func sanitize(s string) string {
s = strings.ReplaceAll(s, ",", "-")
s = strings.ReplaceAll(s, " ", "-")
s = strings.ReplaceAll(s, "#", "-")
s = strings.ReplaceAll(s, "(", "-")
s = strings.ReplaceAll(s, ")", "-")
s = strings.ReplaceAll(s, "+", "-")
s = strings.ReplaceAll(s, "&", "-")
return s
}
}