diff options
Diffstat (limited to 'src/templates.go')
-rw-r--r-- | src/templates.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/templates.go b/src/templates.go index a553766..3852b9d 100644 --- a/src/templates.go +++ b/src/templates.go @@ -31,6 +31,7 @@ var ( "locales": i18n.Locales, "map": templateMakeMap, "safe": asHTML, + "toString": toString, "toUpper": strings.ToUpper, "tuple": templateMakeTuple, "withTranslation": withTranslation, @@ -92,6 +93,10 @@ func asHTML(s string) template.HTML { return template.HTML(s) } +func toString(s template.HTML) string { + return string(s) +} + func templateMakeTuple(args ...any) []any { return args } |