Skip to content

Commit

Permalink
escape_javascript needs to be appied to both name elements in the map
Browse files Browse the repository at this point in the history
(thanks, Eric)
  • Loading branch information
Mike Dvorkin committed Dec 8, 2010
1 parent 757bbbe commit fd416b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/home/_users.html.haml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- users = [[ "all_users", t(:option_all_users) ]] + User.all(:order => "first_name, last_name").map {|u| [escape_javascript(u.full_name), u.full_name]}
- users = [[ "all_users", t(:option_all_users) ]] + User.all(:order => "first_name, last_name").map {|u| [escape_javascript(u.full_name), escape_javascript(u.full_name)]}
- sort_by_menu_items = users.inject([]) do |items, (key, value)|
- items << %Q[{ name: "#{value}", on_select: function() { #{redraw(:user, [ key, (value == t(:option_all_users) ? value.downcase : value) ], url_for(:action => :redraw))} } }]

Expand Down

0 comments on commit fd416b9

Please sign in to comment.