aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorAndrew Thornton <art27@cantab.net>2022-03-23 16:08:27 +0000
committerAndrew Thornton <art27@cantab.net>2022-03-23 16:08:27 +0000
commit81b5bef55a10c59e43987ad4df291b104c69d771 (patch)
tree71d35b0114f4e6e937418aaafc297bae2a919e70 /modules
parent0eff23dae09f6127a39b53c8c3d82db2cd1ada38 (diff)
downloadgitea-81b5bef55a10c59e43987ad4df291b104c69d771.tar.gz
gitea-81b5bef55a10c59e43987ad4df291b104c69d771.zip
Prevent start panic due to missing DotEscape function
Unfortunately #19169 causing a panic at startup in prod mode. This was hidden by dev mode because the templates are compiled dynamically there. The issue is that DotEscape is not in the original FuncMap at the time of compilation which causes a panic. Ref #19169 Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules')
-rw-r--r--modules/templates/helper.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/templates/helper.go b/modules/templates/helper.go
index 918a6523ba..2973b2c938 100644
--- a/modules/templates/helper.go
+++ b/modules/templates/helper.go
@@ -379,6 +379,7 @@ func NewFuncMap() []template.FuncMap {
},
"Join": strings.Join,
"QueryEscape": url.QueryEscape,
+ "DotEscape": DotEscape,
}}
}