From b51842af2642df16505db57bdec8973e464f6822 Mon Sep 17 00:00:00 2001 From: Tobias Kunze Date: Tue, 16 Apr 2019 10:45:45 +0200 Subject: [PATCH] [2.2.x] Fixed #14808 -- Doc'd that trans and blocktrans tags don't escape translations. Backport of 7d49ad76562e8c0597a0eb66046ab423b12888d8 from master --- docs/topics/i18n/translation.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/topics/i18n/translation.txt b/docs/topics/i18n/translation.txt index 04b1060909..421785b085 100644 --- a/docs/topics/i18n/translation.txt +++ b/docs/topics/i18n/translation.txt @@ -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