diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2013-01-02 18:13:26 +1100 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2013-01-02 18:13:26 +1100 |
commit | 493e8e7ec43351952e2d7876afaede0cdb5d3644 (patch) | |
tree | 4aee2e7fd3e33e0eab599bb72433512b403608a5 | |
parent | 1c5e8d8fc4a0e7f4d47f6e1dc8c872b0b1a0f31b (diff) |
Assume the result of doing any translation is html_safe
-rw-r--r-- | lib/i18n_fixes.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/i18n_fixes.rb b/lib/i18n_fixes.rb index 6e684d44a..f75b969c4 100644 --- a/lib/i18n_fixes.rb +++ b/lib/i18n_fixes.rb @@ -6,7 +6,9 @@ # so that we can interpolate our translation strings nicely def _(key, options = {}) - translation = FastGettext._(key) || key + # Assume the result of doing any translation is html_safe. + # In other words, we trust the translators. + translation = FastGettext._(key).html_safe || key gettext_interpolate(translation, options) end |