HI!
Currently, I’m implementing a third-party slider.
To make things a little bit easier I manager to insert a plain html code into markdown.
As for output I’ve set a custom template which is pretty simple, it’s consists of a three parts:
Understood
oh, I’ve got several hundreds of that quotes in that particular code…
So, it seems that there is only one solution - to move all the code from markdown into html.twig template
I’ve got a running website, which was upgraded from Grav 1.7 and have compatibility modes set to “yes”. There I’ve post a similar page with html and it does work…
sorry, I wasn’t watchful enough.
In the code quotes were in place, but I think I found a clue, correct me if I am wrong.
I’ve pasted the code once more in markdown eliminating so spaces, and voila, everything is rendered in place. So, does the compatibility mode strictly check the formatting issues?
@01K, I’m using a fresh Grav 1.7 installation and have not altered any compatibility settings.
I would not alter the Grav 1.7 default compatibility Twig settings because auto-escape has been added to Grav 1.7 to prevent XSS (cross-site scripting) attacks.
When altering the compatibility modes as shown in the upgrade manual, your site is again vulnerable to the XSS attacks as was the case for Grav 1.6.
Use filter |raw in Twig if fields (like page.content) contain HTML code that needs to be preserved and not escaped.
By the way, the compatibility settings have nothing to do with the <pre><code> issue you experienced. I believe that was caused by a syntax error in the code.
Because my project was updated from 1.6 to 1.7.x by default the compatibility feature was enabled. So, now I’ve set them (set to No) as they are in fresh Grav 1.7 installation