🐛 Fixed bloken safing slice of bytes
/ docker (push) Successful in 1m9s
Details
/ docker (push) Successful in 1m9s
Details
This commit is contained in:
parent
33aaab41a2
commit
ed217f118c
|
@ -19,11 +19,12 @@ func (Namespace) HTML(v reflect.Value) (template.HTML, error) {
|
|||
default:
|
||||
return "", ErrSafeHTML
|
||||
case reflect.Slice:
|
||||
if v.Elem().Kind() != reflect.Uint8 {
|
||||
switch v.Type().Elem().Kind() {
|
||||
default:
|
||||
return "", ErrSafeHTML
|
||||
case reflect.Uint8:
|
||||
return template.HTML(v.Bytes()), nil
|
||||
}
|
||||
|
||||
return template.HTML(v.Bytes()), nil
|
||||
case reflect.String:
|
||||
return template.HTML(v.String()), nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue