summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2017-06-15 08:47:07 +0200
committerClaude Paroz <claude@2xlibre.net>2017-06-15 21:00:50 +0200
commitceca221b31a38b01ee951fab82d5dc1c200c27b4 (patch)
tree9d1b528d5982f41c5d1f92d42ef828dce63d2c4a /django
parenta6b5321ce997b899e540bb427cca98cb2b93a106 (diff)
Fixed #28304 -- Kept SafeData type for pgettext-translated strings
Diffstat (limited to 'django')
-rw-r--r--django/utils/translation/trans_real.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/django/utils/translation/trans_real.py b/django/utils/translation/trans_real.py
index b747f3aed1..6b3aeb127e 100644
--- a/django/utils/translation/trans_real.py
+++ b/django/utils/translation/trans_real.py
@@ -327,6 +327,8 @@ def pgettext(context, message):
if CONTEXT_SEPARATOR in result:
# Translation not found
result = message
+ elif isinstance(message, SafeData):
+ result = mark_safe(result)
return result