if ($node instanceof Twig_Node_Expression_Constant) {
// constants are marked safe for all
$this->setSafe($node, array('all'));
+ } elseif ($node instanceof Twig_Node_Expression_BlockReference) {
+ // blocks are safe by definition
+ $this->setSafe($node, array('all'));
+ } elseif ($node instanceof Twig_Node_Expression_Parent) {
+ // parent block is safe by definition
+ $this->setSafe($node, array('all'));
} elseif ($node instanceof Twig_Node_Expression_Conditional) {
// intersect safeness of both operands
$safe = $this->intersectSafe($this->getSafe($node->getNode('expr2')), $this->getSafe($node->getNode('expr3')));
ob_start();
$this->displayParentBlock($name, $context, $blocks);
- return new Twig_Markup(ob_get_clean());
+ return ob_get_clean();
}
/**
ob_start();
$this->displayBlock($name, $context, $blocks);
- return new Twig_Markup(ob_get_clean());
+ return ob_get_clean();
}
/**