mirror of
https://github.com/glanceapp/glance.git
synced 2025-06-21 10:27:45 +02:00
Don't use sprintf for relative time attribute
This commit is contained in:
parent
c8ff5362a3
commit
b44b7b80ff
@ -29,7 +29,7 @@ var globalTemplateFunctions = template.FuncMap{
|
|||||||
return intl.Sprintf("%.2f", price)
|
return intl.Sprintf("%.2f", price)
|
||||||
},
|
},
|
||||||
"dynamicRelativeTimeAttrs": func(t time.Time) template.HTMLAttr {
|
"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) + `"`)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user