Skip to content
Permalink
Browse files

Adding a beforeRender() that automatically escapes all the content se…

…nt to errors handled by CakeErrorController.
  • Loading branch information...
markstory committed Aug 30, 2010
1 parent 78ac5bd commit 612c52bb8b98506fc80e8c31ba0153e21a126f1f
Showing with 11 additions and 0 deletions.
  1. +11 −0 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);
}
}
}

0 comments on commit 612c52b

Please sign in to comment.
You can’t perform that action at this time.