Open imayatech opened 1 year ago
@imayatech since FET
will translate the code into html/template
template code, the func.go
provides a method named safe
to allowed HTML output. https://github.com/fefit/fet/blob/9e2ebbd55cc8678c84d2742234dc69c3bbc876b3/lib/funcs/funcs.go#L226
so you can use the method in the code like below:
<html><body>
{%$myvar = "<b>Hello</b> world"|safe%}
{%$myvar}
</body></html>
I hope that can solves your problem. thx for your issue~
Is a way to pass HTML content in a variable and disable the escaping process?
P.e.:
Expected output: