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

Using context.Render() to render a template with html not being escaped🤗 #1224

Closed
Foosec opened this issue Mar 13, 2021 · 2 comments
Closed

Comments

@Foosec
Copy link

Foosec commented Mar 13, 2021

Question description
Ive got some markdown, which i parse into HTML.
I would now like to render that HTML with context.Render() into my template

{{template "header" .}}

<div>
    {{ .BlogPost.PostText }}
</div>

{{template "footer" .}}

where PostText is HTML that i would like to not be escaped.
It seems that by default it escapes the HTML and it doesn't get rendered by the browser.
How can i work around this?

@ReneWerner87
Copy link
Member

@Foosec
Copy link
Author

Foosec commented Mar 13, 2021

Thank you for the superbly quick response!

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

2 participants