Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GFiredrake opened this issue Feb 8, 2017 · 2 comments
Open

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

GFiredrake opened this issue Feb 8, 2017 · 2 comments

Comments

@GFiredrake
Copy link

GFiredrake commented Feb 8, 2017

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?

@jxson
Copy link
Owner

jxson commented Feb 8, 2017

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...

@juliedavila
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants