aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r--actionview/lib/action_view/helpers/url_helper.rb2
-rw-r--r--actionview/lib/action_view/routing_url_for.rb5
-rw-r--r--actionview/lib/action_view/template.rb2
3 files changed, 5 insertions, 4 deletions
diff --git a/actionview/lib/action_view/helpers/url_helper.rb b/actionview/lib/action_view/helpers/url_helper.rb
index d676a0a931..5684de35e8 100644
--- a/actionview/lib/action_view/helpers/url_helper.rb
+++ b/actionview/lib/action_view/helpers/url_helper.rb
@@ -464,7 +464,7 @@ module ActionView
extras = %w{ cc bcc body subject reply_to }.map! { |item|
option = html_options.delete(item).presence || next
- "#{item.dasherize}=#{Rack::Utils.escape_path(option)}"
+ "#{item.dasherize}=#{ERB::Util.url_encode(option)}"
}.compact
extras = extras.empty? ? '' : '?' + extras.join('&')
diff --git a/actionview/lib/action_view/routing_url_for.rb b/actionview/lib/action_view/routing_url_for.rb
index 20d6b9a64c..b4cbc80bd5 100644
--- a/actionview/lib/action_view/routing_url_for.rb
+++ b/actionview/lib/action_view/routing_url_for.rb
@@ -105,10 +105,11 @@ module ActionView
when :back
_back_url
when Array
+ components = options.dup
if _generate_paths_by_default
- polymorphic_path(options, options.extract_options!)
+ polymorphic_path(components, components.extract_options!)
else
- polymorphic_url(options, options.extract_options!)
+ polymorphic_url(components, components.extract_options!)
end
else
method = _generate_paths_by_default ? :path : :url
diff --git a/actionview/lib/action_view/template.rb b/actionview/lib/action_view/template.rb
index e232808dcb..0ed208f27e 100644
--- a/actionview/lib/action_view/template.rb
+++ b/actionview/lib/action_view/template.rb
@@ -141,7 +141,7 @@ module ActionView
@compile_mutex = Mutex.new
end
- # Returns if the underlying handler supports streaming. If so,
+ # Returns whether the underlying handler supports streaming. If so,
# a streaming buffer *may* be passed when it start rendering.
def supports_streaming?
handler.respond_to?(:supports_streaming?) && handler.supports_streaming?