aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2008-05-12 23:54:21 -0700
committerPratik Naik <pratiknaik@gmail.com>2008-05-13 18:33:33 +0100
commitd16fbe53b202d52b5ef12526941ed50da2daf38f (patch)
treeff6233fa6cdef47d53d6b2cb6a4c4addf6c4e8ad /actionpack/lib/action_view
parent3fee2378edd45188e41a7d14d4ca0a88280b541e (diff)
downloadrails-d16fbe53b202d52b5ef12526941ed50da2daf38f.tar.gz
rails-d16fbe53b202d52b5ef12526941ed50da2daf38f.tar.bz2
rails-d16fbe53b202d52b5ef12526941ed50da2daf38f.zip
Fix remote_function to escape apostrophes inside the remote url passed to Ajax.Update. [#180 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/prototype_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/prototype_helper.rb b/actionpack/lib/action_view/helpers/prototype_helper.rb
index 1b12aa8058..1a0e660d52 100644
--- a/actionpack/lib/action_view/helpers/prototype_helper.rb
+++ b/actionpack/lib/action_view/helpers/prototype_helper.rb
@@ -458,7 +458,7 @@ module ActionView
url_options = options[:url]
url_options = url_options.merge(:escape => false) if url_options.is_a?(Hash)
- function << "'#{url_for(url_options)}'"
+ function << "'#{escape_javascript(url_for(url_options))}'"
function << ", #{javascript_options})"
function = "#{options[:before]}; #{function}" if options[:before]