Skip to content

A self-hosted dashboard that puts all your feeds in one place

Don't use sprintf for relative time attribute

Svilen Markovb44b7b80ff4c
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) + `"`)
},
}