]> source.dussan.org Git - gitea.git/commitdiff
Prevent start panic due to missing DotEscape function
authorAndrew Thornton <art27@cantab.net>
Wed, 23 Mar 2022 16:08:27 +0000 (16:08 +0000)
committerAndrew Thornton <art27@cantab.net>
Wed, 23 Mar 2022 16:08:27 +0000 (16:08 +0000)
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>
modules/templates/helper.go

index 918a6523ba2a7f3c690eeab5251d71c0f1b0d27a..2973b2c93803e264a2e96abe07757a5d2fda1c6e 100644 (file)
@@ -379,6 +379,7 @@ func NewFuncMap() []template.FuncMap {
                },
                "Join":        strings.Join,
                "QueryEscape": url.QueryEscape,
+               "DotEscape":   DotEscape,
        }}
 }