front-matter icon indicating copy to clipboard operation
front-matter copied to clipboard

Front matter Encoding < and > to &lt; and &gt;

Open GFiredrake opened this issue 9 years ago • 2 comments

Im sending the following bits thru to a html document using a gulp process to merge several files to turn it into a razor template --- layout: default model: "@inherits RazorEngine.Templating.TemplateBase<BookingConfirmationEM>" name: comformation generic subject: Booking Confirmation ---

then putting it in at the top like this

{{model}}

but it is coming out the other end encouded as & lt ; and & gt ; (minus the spaces) is there a way to stop this from happening?

GFiredrake avatar Feb 08 '17 09:02 GFiredrake

Hmm,

I would inspect the front-matter before it gets passed into your template. I have seen this before in other contexts where markdown was escaping the output. There are a few ways to get around it but it might depend on how the render engine you are using handles input.

I think first figure out if it is front-matter doing the escaping. I would be surprised but it might be possible that the yaml parser is doing something there.

You could try escaping the HTML chars and see if that gets you anywhere too...

jxson avatar Feb 08 '17 18:02 jxson

yeah, maybe just use he.decode(frontMatter) or something

juliedavila avatar Nov 01 '18 15:11 juliedavila