Permalink
Browse files

Translated strings in the view are assumed html_safe (Closes #3401)

  • Loading branch information...
1 parent a900205 commit 2675e4ef83b2a0fb38f01140d65fbded3ceac9ab @dhh dhh committed Dec 25, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_view/helpers/translation_helper.rb
@@ -12,7 +12,7 @@ module TranslationHelper
# 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')

0 comments on commit 2675e4e

Please sign in to comment.