Skip to content

Commit

Permalink
if rails_xss is being used, 'raw' the output
Browse files Browse the repository at this point in the history
  • Loading branch information
reddavis authored and binarylogic committed May 27, 2010
1 parent ccb6fa5 commit d15c010
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/searchlogic/rails_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ def order(search, options = {}, html_options = {})
url_options = {
options[:params_scope] => search.conditions.merge( { :order => new_scope } )
}.deep_merge(options[:params] || {})

options[:as] = raw(options[:as]) if defined?(RailsXss)

link_to options[:as], url_for(url_options), html_options
end

Expand All @@ -60,8 +63,8 @@ def form_for(*args, &block)
end
super
end
# Automatically adds an "order" hidden field in your form to preserve how the data

# Automatically adds an "order" hidden field in your form to preserve how the data
# is being ordered.
def fields_for(*args, &block)
if search_obj = args.find { |arg| arg.is_a?(Searchlogic::Search) }
Expand Down

0 comments on commit d15c010

Please sign in to comment.