Inside of my View page I have the following line:
@Model.RenderedMarkdown
RenderedMarkdown is generated with the following:
var renderer = new MarkdownSharp.Markdown();
return renderer.Transform(Markdown);
Now for this example, let’s just say that Markdown was this:
###test
which will change into this:
<h3>test</h3>
However what is being rendered on my page is this:
<h3>test</h3>
Is there a setting somewhere to turn off this automatic encoding?
Try this:
Put your variable to
Rawhelper.Something like this:
Added:
Thanks to mythz and his comment:
There is also an T.AsRaw() extension method. Which basically just wraps the string into a MvcHtmlString which doesn't get escaped.