Skip to content
Browse files

eliminate more wasteful allocations

  • Loading branch information...
1 parent a8a6f85 commit 17fc6f16eb2be481a4d036bea58b3e4ae0052f3a @tenderlove tenderlove committed Jun 6, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionview/lib/action_view/helpers/url_helper.rb
View
4 actionview/lib/action_view/helpers/url_helper.rb
@@ -462,7 +462,7 @@ def link_to_if(condition, name, options = {}, html_options = {}, &block)
# <strong>Email me:</strong> <span>me@domain.com</span>
# </a>
def mail_to(email_address, name = nil, html_options = {}, &block)
- email_address = ERB::Util.html_escape(email_address)
+ email_address = ERB::Util.unwrapped_html_escape(email_address)
html_options, name = name, nil if block_given?
html_options = (html_options || {}).stringify_keys
@@ -471,7 +471,7 @@ def mail_to(email_address, name = nil, html_options = {}, &block)
option = html_options.delete(item) || next
"#{item}=#{Rack::Utils.escape_path(option)}"
}.compact
- extras = extras.empty? ? '' : '?' + ERB::Util.html_escape(extras.join('&'))
+ extras = extras.empty? ? '' : '?' + ERB::Util.unwrapped_html_escape(extras.join('&'))
html_options["href"] = "mailto:#{email_address}#{extras}".html_safe

0 comments on commit 17fc6f1

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