diff --git a/element.go b/element.go index bcaff44..e5cad54 100644 --- a/element.go +++ b/element.go @@ -183,10 +183,12 @@ func (e *Element) ParseParams(params []any) (attrs []template.HTMLAttr) { case []template.HTMLAttr: attrs = append(attrs, data...) case string: - attrs = append(attrs, template.HTMLAttr(data)) // #nosec G203 + attr := template.HTMLAttr(data) // #nosec G203 + attrs = append(attrs, attr) case []string: for _, s := range data { - attrs = append(attrs, template.HTMLAttr(s)) // #nosec G203 + attr := template.HTMLAttr(s) // #nosec G203 + attrs = append(attrs, attr) } case EventFn: if data != nil {