diff options
author | Michael Koziarski <michael@koziarski.com> | 2007-09-02 23:51:27 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2007-09-02 23:51:27 +0000 |
commit | bde8be41fb3141e33dc86e24fa3fe6200cbb9e87 (patch) | |
tree | 5eebb5e24add6437c74547b46c5809397a694d61 /actionpack/lib/action_view | |
parent | 2fc4be68a6b65074726bee493920040da0e6e04d (diff) | |
download | rails-bde8be41fb3141e33dc86e24fa3fe6200cbb9e87.tar.gz rails-bde8be41fb3141e33dc86e24fa3fe6200cbb9e87.tar.bz2 rails-bde8be41fb3141e33dc86e24fa3fe6200cbb9e87.zip |
Properly quote the arguments to visual_effect. Closes #7220 [jeremymcanally]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7396 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/helpers/scriptaculous_helper.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/scriptaculous_helper.rb b/actionpack/lib/action_view/helpers/scriptaculous_helper.rb index f79a3c50e3..033000b004 100644 --- a/actionpack/lib/action_view/helpers/scriptaculous_helper.rb +++ b/actionpack/lib/action_view/helpers/scriptaculous_helper.rb @@ -50,6 +50,10 @@ module ActionView "'#{js_options[:queue]}'" end if js_options[:queue] + [:endcolor, :direction, :startcolor, :scaleMode, :restorecolor].each do |option| + js_options[option] = "'#{js_options[option]}'" if js_options[option] + end + if TOGGLE_EFFECTS.include? name.to_sym "Effect.toggle(#{element},'#{name.to_s.gsub(/^toggle_/,'')}',#{options_for_javascript(js_options)});" else |