getPreEscape example



        $class = \get_class($node);

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

    private function preEscapeFilterNode(FilterExpression $filter, Environment $env): FilterExpression
    {
        $name = $filter->getNode('filter')->getAttribute('value');

        $type = $env->getFilter($name)->getPreEscape();
        if (null === $type) {
            return $filter;
        }

        $node = $filter->getNode('node');
        if ($this->isSafeFor($type$node$env)) {
            return $filter;
        }

        $filter->setNode('node', $this->getEscaperFilter($type$node));

        
Home | Imprint | This part of the site doesn't use cookies.