I store encoded HTML in the database.
The only way i could display it correctly is :
@MvcHtmlString.Create(HttpU
this is pretty simple:
HttpUtility.HtmlDecode(Model.Content)
Another Solution, you could also return a HTMLString, Razor will output the correct formatting:
in the view itself:
@Html.GetSomeHtml()
in controller:
public static HtmlString GetSomeHtml()
{
var Data = "abc
123";
return new HtmlString(Data);
}