Skip to content

Commit

Permalink
Translated strings in the view are assumed html_safe (Closes #3401)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhh committed Dec 25, 2009
1 parent a900205 commit 2675e4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actionpack/lib/action_view/helpers/translation_helper.rb
Expand Up @@ -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')
Expand Down

0 comments on commit 2675e4e

Please sign in to comment.