diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-04 20:00:55 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-04 20:00:55 -0700 |
commit | 839e2f96647d5b29cc2865555a6f615c31429109 (patch) | |
tree | bacf320fbeb4703f5ba7f0c5ded02bdcc1bad6a1 /actionpack/lib | |
parent | 714fea4540c96f70d044e2bd1be92b504d1f8fa3 (diff) | |
download | rails-839e2f96647d5b29cc2865555a6f615c31429109.tar.gz rails-839e2f96647d5b29cc2865555a6f615c31429109.tar.bz2 rails-839e2f96647d5b29cc2865555a6f615c31429109.zip |
cleaning up more crazy!
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/url_helper.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb index 0eed3ea259..651240a122 100644 --- a/actionpack/lib/action_view/helpers/url_helper.rb +++ b/actionpack/lib/action_view/helpers/url_helper.rb @@ -501,10 +501,10 @@ module ActionView string += 'mailto:'.unpack('C*').map { |c| sprintf("&#%d;", c) }.join - email_address.each_byte do |c| + string += email_address.unpack('C*').map do |c| char = c.chr - string << (char =~ /\w/ ? sprintf("%%%x", c) : char) - end + char =~ /\w/ ? sprintf("%%%x", c) : char + end.join content_tag "a", name || email_address_encoded.html_safe, html_options.merge("href" => "#{string}#{extras}".html_safe) else content_tag "a", name || email_address_obfuscated.html_safe, html_options.merge("href" => "mailto:#{email_address}#{extras}".html_safe) |