I've a String field on my model that contains an html value, my problem is that when I place the code to render this field on my view it will be entirely reconverted to html, and the final result is a big string with html characters escaped...
@field //= "<div>"
renders
< ;div> ;
How can i override this behavior and force it to write the html unescaped on my field?
You could use the Html.Raw
helper:
@Html.Raw(field)
Use @Html.Raw:
@Html.Raw(field)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With