mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-28 04:36:11 +01:00
add allow attribute class
to <code>
This commit is contained in:
parent
f432f1f41c
commit
357c002c03
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue