瀏覽代碼

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

Tobias Kunze 6 年之前
父節點
當前提交
7d49ad7656
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      docs/topics/i18n/translation.txt

+ 7 - 0
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