Permalink
Browse files

Escape single quotes after Helper serialization

  • Loading branch information...
1 parent 8f1125e commit a4aaaff53ac4b04477dd929b30f9986f222b1c79 @teddyzeenny teddyzeenny committed Nov 28, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/View/Helper/CacheHelper.php
@@ -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)) . '\'));

0 comments on commit a4aaaff

Please sign in to comment.