diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-06-26 13:05:08 -0700 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-06-26 13:05:08 -0700 |
commit | 27d6ad899f594bd9b79e54cdc5a3c17110f3b26c (patch) | |
tree | b75973ee4325bd11f27220e38d1e899076948c78 /app/models/user.rb | |
parent | 9bbc93bfd8ba8aaaf9bd1ad9031368b7faad8239 (diff) | |
parent | 3194a7801684d010dac94c26cf39bb780bfcd17e (diff) |
Merge branch 'release/0.12'0.12
Conflicts:
locale/he_IL/app.po
locale/hr_HR/app.po
locale/nb_NO/app.po
locale/uk/app.po
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 306d6ad4a..9da4ad743 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -107,8 +107,11 @@ class User < ActiveRecord::Base end if self.public_banned? # Use interpolation to return a string rather than a SafeBuffer so that - # gsub can be called on it until we upgrade to Rails 3.2 - name = "#{_("{{user_name}} (Account suspended)", :user_name=> name)}" + # gsub can be called on it until we upgrade to Rails 3.2. The name returned + # is not marked as HTML safe so will be escaped automatically in views. We + # do this in two steps so the string still gets picked up for translation + name = _("{{user_name}} (Account suspended)", :user_name=> name.html_safe) + name = "#{name}" end name end |