mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
- bugfix {block}{/block} tags did not work inside double quoted issues #18
This commit is contained in:
@@ -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
|
||||
|
@@ -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("<?php ob_start();\n%s\n%s=ob_get_clean();?>", preg_replace(array('/^\s*<\?php\s+/', '/\s*\?>\s*$/'), '', $this->data), $var);
|
||||
$this->parser->compiler->prefix_code[] = sprintf("<?php ob_start();?>\n%s\n<?php %s=ob_get_clean();?>", $this->data, $var);
|
||||
|
||||
return $var;
|
||||
}
|
||||
|
Reference in New Issue
Block a user