diff --git a/doc/filters/escape.rst b/doc/filters/escape.rst index 7c654ab60..9839ef196 100644 --- a/doc/filters/escape.rst +++ b/doc/filters/escape.rst @@ -100,7 +100,7 @@ used in the ``escape`` call) and the second one must be a valid PHP callable: .. code-block:: php $twig = new \Twig\Environment($loader); - $twig->getExtension(\Twig\Extension\CoreExtension::class)->setEscaper('csv', 'csv_escaper'); + $twig->getExtension(\Twig\Extension\EscaperExtension::class)->setEscaper('csv', 'csv_escaper'); When called by Twig, the callable receives the Twig environment instance, the string to escape, and the charset.