I took this exact example and my markdown template has an htmlDump() in it but the output of the htmlDump is encoded. Is there an easy way to prevent that encoding?
var _context = new ScriptContext
{
PageFormats = { new MarkdownPageFormat() },
}.Init();
_context.VirtualFiles.WriteFile("email.md", @"#Request\n\n
{{ htmlDump(data) }}
");
_context.VirtualFiles.WriteFile("layout.html", "<html><body>{{page}}</body></html>");
var data = new FormData() {
FirstName = "John",
LastName="Smith",
Email="me@gmail.com",
Phone="5222222222"
};
var htmlEmail = new PageResult(_context.GetPage("email"))
{
Layout = "layout",
Args = new Dictionary<String, object>()
{
["data"] = data
},
PageTransformers = { MarkdownPageFormat.TransformToHtml }
}.Result;
This is what is produced and I just want the raw
<html><body><h1>CCPA Request\n</h1>
<pre><code> <table class="table"><tbody><tr><th>Id</th><td>2</td></tr><tr><th>CreatedDate</th><td>2020-10-16</td></tr><tr><th>KnowWhatWasCollected</th><td>True</td></tr><tr><th>DeleteMyInfo</th><td>False</td></tr><tr><th>FirstName</th><td>Test</td></tr><tr><th>LastName</th><td>Test last</td></tr><tr><th>Phone</th><td>55555555</td></tr><tr><th>Email</th><td>e@e.com</td></tr><tr><th>Ip</th><td>::1</td></tr><tr><th>RecaptchaResponse</th><td>abc</td></tr><tr><th>RecaptchaScore</th><td>0</td></tr></tbody></table>
</code></pre>
</body></html>