After upgrading Grav to v.1.7, all output from PHP is escaped.
Simple test /user/plugins/cadphp/php with the code in the file ‘test.php’
<?php
return "It works.";
After I open /test page
(cadphp:p1:test)
the output rendered with escaped characters <, p and >
I think, CadPHP does not work, because of **auto-escaping** introduced in v.1.7 ("https://learn.getgrav.org/17/advanced/grav-development/grav-17-upgrade-guide#twig")
The plugin is triggered on event onPageContentRaw
(source: $e['page']->setRawContent($content);)
before Twig.
The setting "Twig compatibility" not connected with this issue, changing On or Off does not help.
How to make CadPHP to work again on v.1.7? I've done some simple calculator on my site. It is broken after the upgrade to 1.7. On the old site (v1.6.25) my calculator is OK.
The main problem is in lack of twig filter “|raw” in the template “Default” of the page I used for calculator. The issue nor in the GRAV engine, or plugin or site settings, but in the Twig template. I need to find and update all twig pages’ (templates)
with “page.content” pattern, and add there |raw filter as it is described in the documentation: