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