aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/translation_helper.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2009-12-24 20:32:53 -0800
committerDavid Heinemeier Hansson <david@loudthinking.com>2009-12-24 20:32:53 -0800
commit0a365d63f6fc99ce63781a15aefda87c4074108d (patch)
treef58db4ae60f9886c2c59422df690aeab8915e739 /actionpack/lib/action_view/helpers/translation_helper.rb
parent6ce5982afa4e368a3baf9c8049824fd0c6d2d8fb (diff)
downloadrails-0a365d63f6fc99ce63781a15aefda87c4074108d.tar.gz
rails-0a365d63f6fc99ce63781a15aefda87c4074108d.tar.bz2
rails-0a365d63f6fc99ce63781a15aefda87c4074108d.zip
Translated strings in the view are assumed html_safe (Closes #3401)
Diffstat (limited to 'actionpack/lib/action_view/helpers/translation_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/translation_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/translation_helper.rb b/actionpack/lib/action_view/helpers/translation_helper.rb
index 564f12c955..35c431d78d 100644
--- a/actionpack/lib/action_view/helpers/translation_helper.rb
+++ b/actionpack/lib/action_view/helpers/translation_helper.rb
@@ -12,7 +12,7 @@ module ActionView
# prepend the key with a period, nothing is converted.
def translate(key, options = {})
options[:raise] = true
- I18n.translate(scope_key_by_partial(key), options)
+ I18n.translate(scope_key_by_partial(key), options).html_safe!
rescue I18n::MissingTranslationData => e
keys = I18n.send(:normalize_translation_keys, e.locale, e.key, e.options[:scope])
content_tag('span', keys.join(', '), :class => 'translation_missing')