aboutsummaryrefslogtreecommitdiff
path: root/dom
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2025-12-13 18:38:35 +0100
committerAnhgelus Morhtuuzh <william@herges.fr>2025-12-13 18:38:35 +0100
commit1f8505e3b83d77a9cbed56c1182522efeba1f199 (patch)
tree010d985ffa5f9fa534f6f2921465fd2bd43bd6fc /dom
parentdeed583618a2ceb91e2c166d804dee575476c07c (diff)
refactor(backend): use dom package to render link
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 {