From 56fd57b32b6c30071c76ebc04593ed54c45c006e Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Sun, 29 Nov 2020 15:35:38 +0100 Subject: [PATCH] Adding link to RFC --- doc/filters/data_uri.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/filters/data_uri.rst b/doc/filters/data_uri.rst index afbf4e2fe..c11a18073 100644 --- a/doc/filters/data_uri.rst +++ b/doc/filters/data_uri.rst @@ -5,8 +5,8 @@ The ``data_uri`` filter was added in Twig 2.12. -The ``data_uri`` filter generates a URL using the data scheme as defined in RFC -2397: +The ``data_uri`` filter generates a URL using the data scheme as defined in +`RFC 2397`_: .. code-block:: html+twig @@ -32,8 +32,8 @@ The ``data_uri`` filter generates a URL using the data scheme as defined in RFC $ composer require twig/html-extra - Then, use the ``twig/extra-bundle`` on Symfony projects or add the extension - explicitly on the Twig environment:: + On Symfony projects, install the ``twig/extra-bundle``: ``composer require twig/extra-bundle`` + Otherwise, add the extension explicitly on the Twig environment:: use Twig\Extra\Html\HtmlExtension; @@ -42,7 +42,7 @@ The ``data_uri`` filter generates a URL using the data scheme as defined in RFC .. note:: - The filter does not perform any length validation on purpose (limits depends + The filter does not perform any length validation on purpose (limit depends on the usage context), validation should be done before calling this filter. Arguments @@ -50,3 +50,5 @@ Arguments * ``mime``: The mime type * ``parameters``: An array of parameters + +.. _RFC 2397: https://tools.ietf.org/html/rfc2397