mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-05 10:57:00 +02:00
Start autoescaping
This commit is contained in:
@@ -242,6 +242,10 @@ class AdminPlugin extends Plugin
|
||||
{
|
||||
// Only activate admin if we're inside the admin path.
|
||||
if ($this->active) {
|
||||
|
||||
// Turn on Twig autoescaping
|
||||
$this->config->set('system.twig.autoescape', true);
|
||||
|
||||
if (php_sapi_name() == 'cli-server') {
|
||||
throw new \RuntimeException('The Admin Plugin cannot run on the PHP built-in webserver. It needs Apache, Nginx or another full-featured web server.', 500);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user