Skip to content
This repository
Browse code

Add proper fix to `mail_to` helper.

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

0 notes on commit 4b1309e

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