From 8b8cfb0f4e213875890bd8c423298b1fb324834c Mon Sep 17 00:00:00 2001 From: feldenla Date: Thu, 19 Dec 2019 18:02:19 +0000 Subject: [PATCH 1/3] language typo --- doc/tests/sameas.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/tests/sameas.rst b/doc/tests/sameas.rst index 4fc267dbcb..b400b89c55 100644 --- a/doc/tests/sameas.rst +++ b/doc/tests/sameas.rst @@ -5,7 +5,7 @@ The ``same as`` test was added in Twig 1.14.2 as an alias for ``sameas``. ``same as`` checks if a variable is the same as another variable. -This is the equivalent to ``===`` in PHP: +This is equivalent to ``===`` in PHP: .. code-block:: twig From 1a874b581a056ea494380739346577a738b36e3a Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 20 Dec 2019 13:14:10 +0100 Subject: [PATCH 2/3] Remove obsolete page --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 7e50865809..c306353a9d 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,6 @@ }, { "name": "Twig Team", - "homepage": "https://twig.symfony.com/contributors", "role": "Contributors" }, { From 92e1cd35c5591359a04f24ce1082f59825b5cade Mon Sep 17 00:00:00 2001 From: Laurent VOULLEMIER Date: Sun, 22 Dec 2019 09:16:04 +0100 Subject: [PATCH 3/3] Update doc with new escaping behavior When applied on ternary statements --- doc/api.rst | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/doc/api.rst b/doc/api.rst index 8dc1f2a763..40ccd6992e 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -416,7 +416,7 @@ The escaping rules are implemented as follows: {% set text = "Twig
" %} {{ text }} {# will be escaped #} -* Expressions which the result is always a literal or a variable marked safe +* Expressions which the result is a literal or a variable marked safe are never automatically escaped: .. code-block:: twig @@ -424,14 +424,12 @@ The escaping rules are implemented as follows: {{ foo ? "Twig
" : "
Twig" }} {# won't be escaped #} {% set text = "Twig
" %} - {{ foo ? text : "
Twig" }} {# will be escaped #} + {{ true ? text : "
Twig" }} {# will be escaped #} + {{ false ? text : "
Twig" }} {# won't be escaped #} {% set text = "Twig
" %} {{ foo ? text|raw : "
Twig" }} {# won't be escaped #} - {% set text = "Twig
" %} - {{ foo ? text|escape : "
Twig" }} {# the result of the expression won't be escaped #} - * Escaping is applied before printing, after any other filter is applied: .. code-block:: twig