Commit 07e1dd9a by Jordi Boggiano

Fixed #75: Nested dynamic tags are generating parse errors in compiled templates

parent 71c1d67c
......@@ -25,6 +25,8 @@
Dwoo_Security_Policy (see allowMethod()), this is hardly efficient
though for instance calls since it has to do runtime checks so use
it with caution
* Fixed PHP parse errors being generated in compiled templates when
{dynamic} was nested
* Added $this->viewParam support to ZendFramework adapter through a
Dwoo_Adapters_ZendFramework_Dwoo class that extends Dwoo, you should use
this if you called setEngine() on the ZF view
......
......@@ -27,6 +27,8 @@ class Dwoo_Plugin_dynamic extends Dwoo_Block_Plugin implements Dwoo_ICompilable_
public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content)
{
try {
$compiler->findBlock('dynamic');
$output = Dwoo_Compiler::PHP_OPEN .
'if($doCache) {'."\n\t".
'echo \'<dwoo:dynamic_\'.$dynamicId.\'>'.
......@@ -46,6 +48,9 @@ class Dwoo_Plugin_dynamic extends Dwoo_Block_Plugin implements Dwoo_ICompilable_
$output .= "\n}". Dwoo_Compiler::PHP_CLOSE;
return $output;
} catch (Dwoo_Compilation_Exception $e) {
return $content;
}
}
public static function unescape($output, $dynamicId, $compiledFile)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment