protected function Twig_NodeVisitor_Escaper::escapePrintNode in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php \Twig_NodeVisitor_Escaper::escapePrintNode()
1 call to Twig_NodeVisitor_Escaper::escapePrintNode()
- Twig_NodeVisitor_Escaper::doLeaveNode in vendor/
twig/ twig/ lib/ Twig/ NodeVisitor/ Escaper.php - Called after child nodes are visited.
File
- vendor/
twig/ twig/ lib/ Twig/ NodeVisitor/ Escaper.php, line 75
Class
- Twig_NodeVisitor_Escaper
- Twig_NodeVisitor_Escaper implements output escaping.
Code
protected function escapePrintNode(Twig_Node_Print $node, Twig_Environment $env, $type) {
if (false === $type) {
return $node;
}
$expression = $node
->getNode('expr');
if ($this
->isSafeFor($type, $expression, $env)) {
return $node;
}
$class = get_class($node);
return new $class($this
->getEscaperFilter($type, $expression), $node
->getLine());
}