diff options
author | Xavier Noria <fxn@hashref.com> | 2011-11-17 23:59:19 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-11-17 23:59:19 +0100 |
commit | 1079724fe643fe63e6d58a37274c2cf0ff172a8b (patch) | |
tree | 9dd3c4bc6207a2fa9a7f3288c84319a0bff34ca3 /railties | |
parent | a437986f433a775c7c370ad3f0273938015699df (diff) | |
download | rails-1079724fe643fe63e6d58a37274c2cf0ff172a8b.tar.gz rails-1079724fe643fe63e6d58a37274c2cf0ff172a8b.tar.bz2 rails-1079724fe643fe63e6d58a37274c2cf0ff172a8b.zip |
Revert "warn the user values are directly interpolated into _html translation strings"
Reason: After another round of discussion, it has been
decided to let interpolation deal with unsafe strings
as it should do.
This reverts commit d57d8098fc269a26ea0051a9027a33af1a9a4b2b.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/guides/source/i18n.textile | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/railties/guides/source/i18n.textile b/railties/guides/source/i18n.textile index 43afa6c9e2..2d4cc13571 100644 --- a/railties/guides/source/i18n.textile +++ b/railties/guides/source/i18n.textile @@ -634,18 +634,6 @@ en: !images/i18n/demo_html_safe.png(i18n demo html safe)! -Please note that values are interpolated directly into the translation. -If they need to be escaped you need to pass them already escaped in the +t+ call. - -<erb> -# config/locales/en.yml -en: - welcome_html: <b>Welcome %{name}!</b> - -<%# Note the call to h() to avoid injection %> -<%= t('welcome_html', :name => h(user.name)) %> -</erb> - h3. How to Store your Custom Translations The Simple backend shipped with Active Support allows you to store translations in both plain Ruby and YAML format. [2] |