aboutsummaryrefslogtreecommitdiff
path: root/dom
diff options
context:
space:
mode:
Diffstat (limited to 'dom')
-rw-r--r--dom/html.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/dom/html.go b/dom/html.go
index a7dc434..3e8117f 100644
--- a/dom/html.go
+++ b/dom/html.go
@@ -84,8 +84,8 @@ func NewVoidElement(tag string) VoidElement {
return VoidElement{tag, make(map[string]string), NewClassList()}
}
-func NewImg(src, alt string) Element {
- return NewVoidElement("img").SetAttribute("alt", alt).SetAttribute("src", src)
+func NewImg(src, alt template.HTML) Element {
+ return NewVoidElement("img").SetAttribute("alt", string(alt)).SetAttribute("src", string(src))
}
type ContentElement struct {