17.08.2012

- bugfix compiled code of nocache sections could contain wrong escaping (Forum Topic 22810)
This commit is contained in:
uwe.tews@googlemail.com
2012-08-17 11:19:16 +00:00
parent 090ba8e7c5
commit 9d34e78d0b
2 changed files with 4 additions and 2 deletions

View File

@@ -1,4 +1,7 @@
===== trunk ===== ===== trunk =====
17.08.2012
- bugfix compiled code of nocache sections could contain wrong escaping (Forum Topic 22810)
15.08.2012 15.08.2012
- bugfix template inheritance did produce wrong code if subtemplates with {block} was - bugfix template inheritance did produce wrong code if subtemplates with {block} was
included several times (from smarty-developers forum) included several times (from smarty-developers forum)

View File

@@ -594,8 +594,7 @@ abstract class Smarty_Internal_TemplateCompilerBase {
if ((!($this->template->source->recompiled) || $this->forceNocache) && $this->template->caching && !$this->suppressNocacheProcessing && if ((!($this->template->source->recompiled) || $this->forceNocache) && $this->template->caching && !$this->suppressNocacheProcessing &&
($this->nocache || $this->tag_nocache || $this->forceNocache == 2)) { ($this->nocache || $this->tag_nocache || $this->forceNocache == 2)) {
$this->template->has_nocache_code = true; $this->template->has_nocache_code = true;
$_output = str_replace("'", "\'", $content); $_output = addcslashes($content,'\'\\');
$_output = str_replace('\\\\', '\\\\\\\\', $_output);
$_output = str_replace("^#^", "'", $_output); $_output = str_replace("^#^", "'", $_output);
$_output = "<?php echo '/*%%SmartyNocache:{$this->nocache_hash}%%*/" . $_output . "/*/%%SmartyNocache:{$this->nocache_hash}%%*/';?>\n"; $_output = "<?php echo '/*%%SmartyNocache:{$this->nocache_hash}%%*/" . $_output . "/*/%%SmartyNocache:{$this->nocache_hash}%%*/';?>\n";
// make sure we include modifer plugins for nocache code // make sure we include modifer plugins for nocache code