Commit 6d8b0bbb9639037080b334487dccbe8f209ddd88

Authored by Dmitriy Zaporozhets
Committed by Jacob Vosmaer
1 parent 8a5bf011

Correctly escape search query

Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
app/contexts/search_context.rb
... ... @@ -6,7 +6,8 @@ class SearchContext
6 6 end
7 7  
8 8 def execute
9   - query = Shellwords.shellescape(params[:search])
  9 + query = params[:search]
  10 + query = Shellwords.shellescape(query) if query.present?
10 11  
11 12 return result unless query.present?
12 13  
... ...