From e78b16f93e6369b81667782ad0b1a384485a5a96 Mon Sep 17 00:00:00 2001 From: Andrew Chubatiuk Date: Thu, 28 Sep 2023 13:18:59 +0300 Subject: [PATCH] fixed template symbols in regex --- config.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/config.go b/config.go index 30b9fdd6..4c071568 100644 --- a/config.go +++ b/config.go @@ -34,7 +34,13 @@ var ( ) tmplStart = getenv("TEMPLATE_START", "{{") tmplEnd = getenv("TEMPLATE_END", "}}") - reEnvironmentPlaceholders = regexp.MustCompile(fmt.Sprintf("%s.+?%s", tmplStart, tmplEnd)) + reEnvironmentPlaceholders = regexp.MustCompile( + fmt.Sprintf( + "%s.+?%s", + regexp.QuoteMeta(tmplStart), + regexp.QuoteMeta(tmplEnd), + ), + ) ) func init() {