From b44b7b80ff4c7096b9f4a5aa2a09838e5c08823d Mon Sep 17 00:00:00 2001 From: Svilen Markov <7613769+svilenmarkov@users.noreply.github.com> Date: Fri, 20 Dec 2024 11:41:48 +0000 Subject: [PATCH] Don't use sprintf for relative time attribute --- internal/glance/templates.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/glance/templates.go b/internal/glance/templates.go index e87e714..d9b1a6c 100644 --- a/internal/glance/templates.go +++ b/internal/glance/templates.go @@ -29,7 +29,7 @@ var globalTemplateFunctions = template.FuncMap{ return intl.Sprintf("%.2f", price) }, "dynamicRelativeTimeAttrs": func(t time.Time) template.HTMLAttr { - return template.HTMLAttr(fmt.Sprintf(`data-dynamic-relative-time="%d"`, t.Unix())) + return template.HTMLAttr(`data-dynamic-relative-time="` + strconv.FormatInt(t.Unix(), 10) + `"`) }, }