Merge branch 'feature/autoescape' into develop

# Conflicts:
#	themes/grav/css-compiled/template.css
#	themes/grav/css-compiled/template.css.map
This commit is contained in:
Andy Miller
2016-04-11 17:26:02 -06:00
25 changed files with 74 additions and 65 deletions

View File

@@ -242,6 +242,13 @@ class AdminPlugin extends Plugin
{
// Only activate admin if we're inside the admin path.
if ($this->active) {
// Turn on Twig autoescaping
if (method_exists($this->grav['twig'], 'setAutoescape')) {
$this->grav['twig']->setAutoescape(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);
}