Skip to content

Commit

Permalink
Escape single quotes after Helper serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
teddyzeenny committed Nov 28, 2011
1 parent 8f1125e commit a4aaaff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/View/Helper/CacheHelper.php
Expand Up @@ -279,7 +279,7 @@ protected function _writeFile($content, $timestamp, $useCallbacks = false) {
$response = new CakeResponse(array("charset" => Configure::read("App.encoding")));
$controller = new ' . $this->_View->name . 'Controller($request, $response);
$controller->plugin = $this->plugin = \'' . $this->_View->plugin . '\';
$controller->helpers = $this->helpers = unserialize(\'' . serialize($this->_View->helpers) . '\');
$controller->helpers = $this->helpers = unserialize(\'' . str_replace("'", "\'", serialize($this->_View->helpers)) . '\');
$controller->layout = $this->layout = \'' . $this->_View->layout. '\';
$controller->theme = $this->theme = \'' . $this->_View->theme . '\';
$controller->viewVars = $this->viewVars = unserialize(base64_decode(\'' . base64_encode(serialize($this->_View->viewVars)) . '\'));
Expand Down

0 comments on commit a4aaaff

Please sign in to comment.