1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-07-15 14:54:19 -04:00

add allow attribute class to <code>

This commit is contained in:
Hongcai Deng 2015-09-09 17:31:14 +08:00
parent f432f1f41c
commit 357c002c03

View File

@ -28,6 +28,10 @@ import (
var Sanitizer = bluemonday.UGCPolicy()
func init() {
Sanitizer.AllowAttrs("class").OnElements("code")
}
// Encode string to md5 hex value.
func EncodeMd5(str string) string {
m := md5.New()