mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 19:34:27 +02:00
- bugfix escaping " when block tags are used within doublequoted strings
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
25/06/2010
|
||||||
|
- bugfix escaping " when block tags are used within doublequoted strings
|
||||||
|
|
||||||
24/06/2010
|
24/06/2010
|
||||||
- replace internal get_time() calls with standard PHP5 microtime(true) calls in Smarty_Internal_Utility
|
- 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
|
- added $smarty->register->templateClass() and $smarty->unregister->templateClass() methods for supporting static classes with namespace
|
||||||
|
@@ -6,7 +6,8 @@ abstract class _smarty_parsetree {
|
|||||||
|
|
||||||
/* A complete smarty tag. */
|
/* A complete smarty tag. */
|
||||||
|
|
||||||
class _smarty_tag extends _smarty_parsetree {
|
class _smarty_tag extends _smarty_parsetree
|
||||||
|
{
|
||||||
public $parser;
|
public $parser;
|
||||||
public $data;
|
public $data;
|
||||||
public $saved_block_nesting;
|
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 ($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) {
|
if ($subtree instanceof _smarty_code) {
|
||||||
$this->subtrees[$last_subtree]->data .= '<?php echo ' . $subtree->data . ';?>';
|
$this->subtrees[$last_subtree]->data .= '<?php echo ' . $subtree->data . ';?>';
|
||||||
|
} elseif ($subtree instanceof _smarty_dq_content) {
|
||||||
|
$this->subtrees[$last_subtree]->data .= '<?php echo "' . $subtree->data . '";?>';
|
||||||
} else {
|
} else {
|
||||||
$this->subtrees[$last_subtree]->data .= $subtree->data;
|
$this->subtrees[$last_subtree]->data .= $subtree->data;
|
||||||
}
|
}
|
||||||
@@ -96,7 +99,6 @@ class _smarty_doublequoted extends _smarty_parsetree {
|
|||||||
$this->parser->compiler->has_variable_string = true;
|
$this->parser->compiler->has_variable_string = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// $code = sprintf("(%s)", $code);
|
// $code = sprintf("(%s)", $code);
|
||||||
return $code;
|
return $code;
|
||||||
}
|
}
|
||||||
@@ -117,5 +119,4 @@ class _smarty_dq_content extends _smarty_parsetree {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
Reference in New Issue
Block a user