From 037aeaa63a3d92a66f59b50037fcc4d1aafdfba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20Hu=C3=9F?= Date: Thu, 21 Nov 2024 18:12:07 +0100 Subject: [PATCH] chore: use text/template (#17358) --- util/format.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/format.go b/util/format.go index 80dc05cd3..a825612f4 100644 --- a/util/format.go +++ b/util/format.go @@ -3,11 +3,11 @@ package util import ( "bytes" "fmt" - "html/template" "maps" "regexp" "slices" "strings" + "text/template" "time" "github.com/Masterminds/sprig/v3" @@ -50,7 +50,7 @@ func FormatValue(format string, val interface{}) string { func ReplaceFormatted(s string, kv map[string]interface{}) (string, error) { // Enhanced golang template logic tpl, err := template.New("base"). - Funcs(sprig.FuncMap()). + Funcs(sprig.TxtFuncMap()). Funcs(map[string]any{ "timeRound": timeRound, }).Parse(s)