diff --git a/change_log.txt b/change_log.txt index 1d6d5350..06be758b 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,3 +1,6 @@ +25/06/2010 +- bugfix escaping " when block tags are used within doublequoted strings + 24/06/2010 - replace internal get_time() calls with standard PHP5 microtime(true) calls in Smarty_Internal_Utility - added $smarty->register->templateClass() and $smarty->unregister->templateClass() methods for supporting static classes with namespace diff --git a/libs/sysplugins/smarty_internal_parsetree.php b/libs/sysplugins/smarty_internal_parsetree.php index bba83dba..605fe56b 100644 --- a/libs/sysplugins/smarty_internal_parsetree.php +++ b/libs/sysplugins/smarty_internal_parsetree.php @@ -6,7 +6,8 @@ abstract class _smarty_parsetree { /* A complete smarty tag. */ -class _smarty_tag extends _smarty_parsetree { +class _smarty_tag extends _smarty_parsetree +{ public $parser; public $data; public $saved_block_nesting; @@ -66,6 +67,8 @@ class _smarty_doublequoted extends _smarty_parsetree { if ($last_subtree >= 0 && $this->subtrees[$last_subtree] instanceof _smarty_tag && $this->subtrees[$last_subtree]->saved_block_nesting < $this->parser->block_nesting_level) { if ($subtree instanceof _smarty_code) { $this->subtrees[$last_subtree]->data .= 'data . ';?>'; + } elseif ($subtree instanceof _smarty_dq_content) { + $this->subtrees[$last_subtree]->data .= 'data . '";?>'; } else { $this->subtrees[$last_subtree]->data .= $subtree->data; } @@ -96,8 +99,7 @@ class _smarty_doublequoted extends _smarty_parsetree { $this->parser->compiler->has_variable_string = true; } } - -// $code = sprintf("(%s)", $code); + // $code = sprintf("(%s)", $code); return $code; } } @@ -117,5 +119,4 @@ class _smarty_dq_content extends _smarty_parsetree { } } - ?> \ No newline at end of file