I must be missing something here, because this doc
says, MvcHtmlString.Create("someStringHere") returns html encoded string, but if i have something like MvcHtmlString.Create("<h1>myHeading</h1>") it still shows up as
myHeading
(as heading) and not as encoded text<h1>myHeading</h1>
Then what is meant by the statement
MvcHtmlString.Create(String)
Creates an HTML-encoded string using the specified text value.
I am not able to understand, would be grateful if somebody could explain what does the doc mean and what's the difference between the encoding they are trying to refer to vs html encoding.
Thanks in advance!
@Html.Encode(<MyHtmlStringHere>)instead.