Adding a beforeRender() that automatically escapes all the content sent to errors handled by CakeErrorController.

This commit is contained in:
mark_story 2010-08-29 23:31:20 -04:00
parent 78ac5bd20f
commit 612c52bb8b

View file

@ -31,4 +31,15 @@ class CakeErrorController extends AppController {
$this->Components->trigger('initialize', array(&$this));
$this->_set(array('cacheAction' => false, 'viewPath' => 'errors'));
}
/**
* Escapes the viewVars.
*
* @return void
*/
function beforeRender() {
foreach ($this->viewVars as $key => $value) {
$this->viewVars[$key] = h($value);
}
}
}