aboutsummaryrefslogtreecommitdiff
path: root/internal/template/functions.go
diff options
context:
space:
mode:
authorGravatar Romain de Laage <romain.delaage@rdelaage.ovh> 2024-04-05 12:09:29 +0200
committerGravatar Frédéric Guillot <f@miniflux.net> 2024-04-14 20:08:38 -0700
commit647c66e70af50cf7ca786eba51d4fdb67b89fecc (patch)
tree0b83098620a1be897f8f2081da82c575ee71e1d8 /internal/template/functions.go
parentb205b5aad075dc89040231f87c79bec2a7ea60c7 (diff)
downloadv2-647c66e70af50cf7ca786eba51d4fdb67b89fecc.tar.gz
v2-647c66e70af50cf7ca786eba51d4fdb67b89fecc.tar.zst
v2-647c66e70af50cf7ca786eba51d4fdb67b89fecc.zip
ui: add tag entries page
Diffstat (limited to 'internal/template/functions.go')
-rw-r--r--internal/template/functions.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/template/functions.go b/internal/template/functions.go
index 54e787cf..cfbfc53d 100644
--- a/internal/template/functions.go
+++ b/internal/template/functions.go
@@ -8,6 +8,7 @@ import (
"html/template"
"math"
"net/mail"
+ "net/url"
"slices"
"strings"
"time"
@@ -91,8 +92,9 @@ func (f *funcMap) Map() template.FuncMap {
"nonce": func() string {
return crypto.GenerateRandomStringHex(16)
},
- "deRef": func(i *int) int { return *i },
- "duration": duration,
+ "deRef": func(i *int) int { return *i },
+ "duration": duration,
+ "urlEncode": url.PathEscape,
// These functions are overrode at runtime after the parsing.
"elapsed": func(timezone string, t time.Time) string {