diff --git a/examples/hackernews/partials/comments.go b/examples/hackernews/partials/comments.go index 95ce923..270959a 100644 --- a/examples/hackernews/partials/comments.go +++ b/examples/hackernews/partials/comments.go @@ -75,7 +75,7 @@ func Comment(item news.Comment, nesting int) *h.Element { h.Class("flex gap-1 items-center"), h.Div( h.Class("font-bold text-rose-500"), - h.UnsafeRaw(item.By), + h.Text(item.By), ), h.Div( h.Class("text-sm text-gray-600"), @@ -85,7 +85,7 @@ func Comment(item news.Comment, nesting int) *h.Element { ), h.Div( h.Class("text-sm text-gray-600"), - h.UnsafeRaw(strings.TrimSpace(item.Text)), + h.Text(strings.TrimSpace(item.Text)), ), ), h.If( diff --git a/examples/hackernews/partials/sidebar.go b/examples/hackernews/partials/sidebar.go index d3bbef0..8dbba45 100644 --- a/examples/hackernews/partials/sidebar.go +++ b/examples/hackernews/partials/sidebar.go @@ -142,7 +142,7 @@ var CachedStoryList = h.CachedPerKeyT4(time.Minute*5, func(category string, page h.Class("block p-2 bg-white rounded-md shadow cursor-pointer"), h.Div( h.Class("font-bold"), - h.UnsafeRaw(item.Title), + h.Text(item.Title), ), h.Div( h.Class("text-sm text-gray-600"), diff --git a/examples/hackernews/partials/story.go b/examples/hackernews/partials/story.go index 8b72272..4bea202 100644 --- a/examples/hackernews/partials/story.go +++ b/examples/hackernews/partials/story.go @@ -57,7 +57,7 @@ func StoryBody(story *news.Story) *h.Element { h.Class("prose prose-2xl border-b border-gray-200 pb-3 max-w-none w-full"), h.H5( h.Class("flex gap-2 items-left font-bold"), - h.UnsafeRaw(story.Title), + h.Text(story.Title), ), h.A( h.Href(story.Url), @@ -66,7 +66,7 @@ func StoryBody(story *news.Story) *h.Element { ), h.Div( h.Class("text-sm text-gray-600"), - h.UnsafeRaw(story.Text), + h.Text(story.Text), ), h.Div( h.Class("text-sm text-gray-600 mt-2"),