Skip to content

Commit

Permalink
Prevent start panic due to missing DotEscape function
Browse files Browse the repository at this point in the history
Unfortunately go-gitea#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 go-gitea#19169

Signed-off-by: Andrew Thornton <art27@cantab.net>
  • Loading branch information
zeripath authored and Stelios Malathouras committed Mar 28, 2022
1 parent 3d01d1d commit c92d982
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/templates/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ func NewFuncMap() []template.FuncMap {
},
"Join": strings.Join,
"QueryEscape": url.QueryEscape,
"DotEscape": DotEscape,
}}
}

Expand Down

0 comments on commit c92d982

Please sign in to comment.