diff --git a/cake/libs/controller/cake_error_controller.php b/cake/libs/controller/cake_error_controller.php index aafa76b6d3d..eb60e02b640 100644 --- a/cake/libs/controller/cake_error_controller.php +++ b/cake/libs/controller/cake_error_controller.php @@ -31,4 +31,15 @@ function __construct() { $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); + } + } } \ No newline at end of file