I have a string, read from a database, that contains HTML that I want to output. Despite applying HttpUtility.HtmlDecode()
, the View always renders the string as encoded HTML (i.e. <SPAN>
instead of <SPAN>
).
I am using:
string test = WebUtility.HtmlDecode(myStr);
<span>@test</span>
I have tried:
string test = HttpUtility.HtmlDecode(myStr);
<span>@test</span>
<span>@HttpUtility.HtmlDecode(myStr)</span>