I'm running Postal from a service. My @Message has html. @Html.Raw is not available. When Postal runs my templated view, I get HtmlEncoded html. does anyone know how to fix this?
In our service, we've used:
@Raw(StringToBeEncoded)
In the html template it will complain it can not be resolved, but at runtime @Raw works fine. Its part of RazorEngine.
You can use:
@(new System.Web.HtmlString(StringToBeEncoded))
which is basically the same as does HtmlHelper.Raw(StringToBeEncoded)
method under the hood. Moreover, you will not get any error in Visual Studio for the templates.
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