Skip to content

Is what I want possible, or do I need to rethink how I'm doing it? #620

Answered by joerdav
stobbsm asked this question in Q&A
Discussion options

You must be logged in to vote

You need to use templ.Raw.

templ ContentP(content string) {
  <p>@templ.Raw(content)</p>
}

Of course be very careful that you know that the html you are rendering is safe!

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@stobbsm
Comment options

@joerdav
Comment options

joerdav Mar 15, 2024
Collaborator

Answer selected by stobbsm
@stobbsm
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #619 on March 15, 2024 15:38.