Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Markdown content rendered as escaped HTML

Solved by Ole Vik View solution

Started by Frederick Yocum 6 years ago · 4 replies · 1875 views
6 years ago

Team

I have a clean install of the latest version of Grav running locally to which I added my existing markdown and image files and my adapted theme. The twig content is rendering fine, but the content from the markdown files is showing in the rendered page as escaped HTML.

The same content and theme is running happily on the hosted version ( Grav v1.6.30 - Admin v1.9.18) of the website.

This feels like a setting somewhere which has gone awry, but I can't find it . . . .

6 years ago Solution

You probably need to escape the output using the |raw-filter, like {{ page.content|raw }}. See https://learn.getgrav.org/17/advanced/grav-development/grav-17-upgrade-guide and https://learn.getgrav.org/17/advanced/grav-development/grav-16-upgrade-guide#twig.

1 reply
6 years ago

@OleVik Thanks, I will take a look at the documentation. Glad I chose to upgrade the local server and the not the the public facing site.

6 years ago

Well, the documentation can be rather long. The best approach is always to upgrade locally first, then push the changes to production. So you were going about it the right way.

Suggested topics

Topic Participants Replies Views Activity
General · by themetman, 23 hours ago
2 40 17 hours ago
General · by Hanns Mattes, 1 week ago
0 121 1 week ago
General · by Karmalakas, 1 week ago
2 185 1 week ago
General · by Hanns Mattes, 3 weeks ago
0 235 3 weeks ago
General · by Dima, 4 weeks ago
1 211 4 weeks ago