diff options
author | Unknwon <u@gogs.io> | 2015-11-24 18:49:34 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-11-24 18:49:34 -0500 |
commit | 7f9598141bd7b0200d9342f01243228eab3061ba (patch) | |
tree | c9e5bf147ba72a7f7eb4968f129e32b444b4682b /modules/base | |
parent | 56c66ee486b4b8d544201662de62a23f36e6a069 (diff) | |
download | gitea-7f9598141bd7b0200d9342f01243228eab3061ba.tar.gz gitea-7f9598141bd7b0200d9342f01243228eab3061ba.zip |
fix #2020
Diffstat (limited to 'modules/base')
-rw-r--r-- | modules/base/tool.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/base/tool.go b/modules/base/tool.go index 78983b3611..b1d945117c 100644 --- a/modules/base/tool.go +++ b/modules/base/tool.go @@ -31,8 +31,8 @@ import ( var Sanitizer = bluemonday.UGCPolicy().AllowAttrs("class").Matching(regexp.MustCompile(`[\p{L}\p{N}\s\-_',:\[\]!\./\\\(\)&]*`)).OnElements("code") -// Encode string to md5 hex value. -func EncodeMd5(str string) string { +// EncodeMD5 encodes string to md5 hex value. +func EncodeMD5(str string) string { m := md5.New() m.Write([]byte(str)) return hex.EncodeToString(m.Sum(nil)) |