Skip to content

Commit bdd4d31

Browse files
committed
Merge remote-tracking branch 'origin/2.0' into 2.0
2 parents 43aa772 + 8866336 commit bdd4d31

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

book/translation.rst

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -766,9 +766,9 @@ texts* and complex expressions:
766766

767767
Using the translation tags or filters have the same effect, but with
768768
one subtle difference: automatic output escaping is only applied to
769-
variables translated using a filter. In other words, if you need to
770-
be sure that your translated variable is *not* output escaped, you must
771-
apply the raw filter after the translation filter:
769+
translations using a filter. In other words, if you need to be sure
770+
that your translated is *not* output escaped, you must apply the
771+
``raw`` filter after the translation filter:
772772

773773
.. code-block:: jinja
774774
@@ -779,11 +779,9 @@ texts* and complex expressions:
779779
780780
{% set message = '<h3>foo</h3>' %}
781781
782-
{# a variable translated via a filter is escaped by default #}
782+
{# strings and variables translated via a filter is escaped by default #}
783783
{{ message|trans|raw }}
784-
785-
{# but static strings are never escaped #}
786-
{{ '<h3>foo</h3>'|trans }}
784+
{{ '<h3>bar</h3>'|trans|raw }}
787785
788786
PHP Templates
789787
~~~~~~~~~~~~~

0 commit comments

Comments
 (0)