Symfony\Component\Templating\PhpEngine::escape PHP Method

escape() public method

Escapes a string by using the current charset.
public escape ( mixed $value, string $context = 'html' ) : string
$value mixed A variable to escape
$context string The context name
return string The escaped value
    public function escape($value, $context = 'html')
    {
        return call_user_func($this->getEscaper($context), $value);
    }