You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a way to do it, it's discussed in #175 (comment)
The question we haven't decided on is whether to include the capability to do it, as per React's dangerouslySetInnerHTML.
In templ, at the moment, all Go strings are classed as "unsafe" and therefore need escaping before output, because it's not possible to identify which Go strings are under the programmer's control.
Since a templ component is just some code that implements the templ.Component interface, it's only a few lines of code to create a non-escaped output component. I was thinking that most people don't and shouldn't need it, so leaving it around is an increased security risk for the wider population who might use it without understanding the implications.
Similar to html/template, it would be amazing to be able to render unsafe string ( html template from database for example)
it will be great to be able do it somehow like :
or there is some way how to do it ?
The text was updated successfully, but these errors were encountered: