From 6df84b6fe358d46fd1dd3b8d24d3bee26b9ce77f Mon Sep 17 00:00:00 2001 From: Uwe Tews Date: Tue, 17 Mar 2015 03:31:44 +0100 Subject: [PATCH] - bugfix {block}{/block} tags did not work inside double quoted issues #18 --- libs/Smarty.class.php | 2 +- libs/sysplugins/smarty_internal_parsetree_tag.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index aaf66512..2ab41c82 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -111,7 +111,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.22-dev/11'; + const SMARTY_VERSION = '3.1.22-dev/12'; /** * define variable scopes diff --git a/libs/sysplugins/smarty_internal_parsetree_tag.php b/libs/sysplugins/smarty_internal_parsetree_tag.php index eb14db1c..878c7668 100644 --- a/libs/sysplugins/smarty_internal_parsetree_tag.php +++ b/libs/sysplugins/smarty_internal_parsetree_tag.php @@ -56,7 +56,7 @@ class Smarty_Internal_ParseTree_Tag extends Smarty_Internal_ParseTree public function assign_to_var() { $var = sprintf('$_tmp%d', ++ Smarty_Internal_Templateparser::$prefix_number); - $this->parser->compiler->prefix_code[] = sprintf("", preg_replace(array('/^\s*<\?php\s+/', '/\s*\?>\s*$/'), '', $this->data), $var); + $this->parser->compiler->prefix_code[] = sprintf("\n%s\n", $this->data, $var); return $var; }