diff --git a/doc/api.rst b/doc/api.rst
index 8dc1f2a76..40ccd6992 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