1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[2.2.x] Fixed #14808 -- Doc'd that trans and blocktrans tags don't escape translations.

Backport of 7d49ad7656 from master
This commit is contained in:
Tobias Kunze
2019-04-16 10:45:45 +02:00
committed by Mariusz Felisiak
parent c0dc49a772
commit b51842af26

View File

@@ -567,6 +567,13 @@ As with all template tags, this tag needs to be loaded in all templates which
use translations, even those templates that extend from other templates which
have already loaded the ``i18n`` tag.
.. warning::
Translated strings will not be escaped when rendered in a template.
This allows you to include HTML in translations, for example for emphasis,
but potentially dangerous characters (e.g. ``"``) will also be rendered
unchanged.
.. templatetag:: trans
``trans`` template tag