Skip to content

Commit

Permalink
Add MD5 back to template helper functions to avoid breaking (go-gitea…
Browse files Browse the repository at this point in the history
…#21102)

In go-gitea#20932 the MD5 helper function was removed from template context,
it breaks user's customized templates.

This PR adds the MD5 helper function back.
  • Loading branch information
tyroneyeh committed Sep 14, 2022
1 parent 531da50 commit 4f2cb5b
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 @@ -154,6 +154,7 @@ func NewFuncMap() []template.FuncMap {
"DiffTypeToStr": DiffTypeToStr,
"DiffLineTypeToStr": DiffLineTypeToStr,
"ShortSha": base.ShortSha,
"MD5": base.EncodeMD5,
"ActionContent2Commits": ActionContent2Commits,
"PathEscape": url.PathEscape,
"PathEscapeSegments": util.PathEscapeSegments,
Expand Down

0 comments on commit 4f2cb5b

Please sign in to comment.