protected function Twig_NodeVisitor_Escaper::escapePrintNode in Translation template extractor 6.3
Same name and namespace in other branches
- 7.3 vendor/Twig/NodeVisitor/Escaper.php \Twig_NodeVisitor_Escaper::escapePrintNode()
1 call to Twig_NodeVisitor_Escaper::escapePrintNode()
- Twig_NodeVisitor_Escaper::leaveNode in vendor/
Twig/ NodeVisitor/ Escaper.php - Called after child nodes are visited.
File
- vendor/
Twig/ NodeVisitor/ Escaper.php, line 85
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());
}