From c05c22a45f9332f50eb6efae5a393268f6b6609d Mon Sep 17 00:00:00 2001 From: Nicholas Seckar Date: Wed, 22 Mar 2006 19:41:39 +0000 Subject: Fix double url escaping of remote_function. Add :escape => false option to ActionView's url_for. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4014 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/helpers/prototype_helper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_view/helpers/prototype_helper.rb') diff --git a/actionpack/lib/action_view/helpers/prototype_helper.rb b/actionpack/lib/action_view/helpers/prototype_helper.rb index de964edae8..40bb18c624 100644 --- a/actionpack/lib/action_view/helpers/prototype_helper.rb +++ b/actionpack/lib/action_view/helpers/prototype_helper.rb @@ -301,7 +301,9 @@ module ActionView "new Ajax.Request(" : "new Ajax.Updater(#{update}, " - function << "'#{url_for(options[:url])}'" + url_options = options[:url] + url_options = url_options.merge(:escape => false) if url_options.is_a? Hash + function << "'#{url_for(url_options)}'" function << ", #{javascript_options})" function = "#{options[:before]}; #{function}" if options[:before] -- cgit v1.2.3