getEscaperFilter example

return new ConditionalExpression($expression->getNode('expr1')$expr2$expr3$expression->getTemplateLine());
    }

    private function escapeInlinePrintNode(InlinePrint $node, Environment $env, string $type): Node
    {
        $expression = $node->getNode('node');

        if ($this->isSafeFor($type$expression$env)) {
            return $node;
        }

        return new InlinePrint($this->getEscaperFilter($type$expression)$node->getTemplateLine());
    }

    private function escapePrintNode(PrintNode $node, Environment $env, string $type): Node
    {
        if (false === $type) {
            return $node;
        }

        $expression = $node->getNode('expr');

        if ($this->isSafeFor($type$expression$env)) {
            
Home | Imprint | This part of the site doesn't use cookies.