Skip to content
Grav 2.0 is officially stable. Read the announcement →
General

Markdown content rendered as escaped HTML

Solved by Ole Vik View solution

Started by Frederick Yocum 5 years ago · 4 replies · 1534 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 jean-louis67, 3 weeks ago
2 308 3 weeks ago
General · by Andy Miller, 3 weeks ago
0 311 3 weeks ago
General · by Veehem, 4 weeks ago
0 263 4 weeks ago
General · by milkboy, 4 weeks ago
0 266 4 weeks ago
General · by ian russell, 1 month ago
2 335 1 month ago