🐛 Fixed bloken safing slice of bytes
/ docker (push) Successful in 1m9s Details

This commit is contained in:
Maxim Lebedev 2023-11-09 09:01:34 +06:00
parent 33aaab41a2
commit ed217f118c
Signed by: toby3d
GPG Key ID: 1F14E25B7C119FC5
1 changed files with 4 additions and 3 deletions

View File

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