1
0
Fork 0
forked from NYANDEV/forgejo

Add MD5 back to template helper functions to avoid breaking ()

In  the MD5 helper function was removed from template context,
it breaks user's customized templates.

This PR adds the MD5 helper function back.
This commit is contained in:
wxiaoguang 2022-09-07 19:30:52 +08:00 committed by GitHub
parent 32eef4aa2e
commit 31842f12a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,