Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 0a365d63f6fc99ce63781a15aefda87c4074108d 1 parent 6ce5982
@dhh dhh authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  actionpack/lib/action_view/helpers/translation_helper.rb
View
2  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')
Please sign in to comment.
Something went wrong with that request. Please try again.