Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add proper fix to `mail_to` helper.

* Fix the problem on manipulating on the `ActiveSupport::SafeBuffer`
  • Loading branch information...
commit 4b1309edfefb17de3e07ab96c2a8dec68d49da36 1 parent f57c707
@sikachu sikachu authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  actionpack/lib/action_view/helpers/url_helper.rb
View
2  actionpack/lib/action_view/helpers/url_helper.rb
@@ -483,7 +483,7 @@ def mail_to(email_address, name = nil, html_options = {})
extras << "subject=#{Rack::Utils.escape(subject).gsub("+", "%20")}" unless subject.nil?
extras = extras.empty? ? '' : '?' + html_escape(extras.join('&'))
- email_address_obfuscated = email_address.dup
+ email_address_obfuscated = email_address.to_str
email_address_obfuscated.gsub!(/@/, html_options.delete("replace_at")) if html_options.has_key?("replace_at")
email_address_obfuscated.gsub!(/\./, html_options.delete("replace_dot")) if html_options.has_key?("replace_dot")

0 comments on commit 4b1309e

Please sign in to comment.
Something went wrong with that request. Please try again.