Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Markdown content rendered as escaped HTML

Solved by Ole Vik View solution

Started by Frederick Yocum 5 years ago · 4 replies · 1638 views
5 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 . . . .

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

5 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 Andy Miller, 3 days ago
0 66 3 days ago
General · by lynbor, 4 weeks ago
3 409 1 week ago
General · by lynbor, 2 weeks ago
7 520 1 week ago
General · by Harry, 1 week ago
0 142 1 week ago
General · by Old Man Umby, 4 weeks ago
2 289 3 weeks ago