Commit 31736e9be83da6cf45d5331790bd39b230bbc1f6

Authored by Dmitriy Zaporozhets
1 parent a476bc7b

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,7 +6,8 @@ class SearchContext
6 end 6 end
7 7
8 def execute 8 def execute
9 - query = Shellwords.shellescape(params[:search]) 9 + query = params[:search]
  10 + query = Shellwords.shellescape(query) if query.present?
10 11
11 return result unless query.present? 12 return result unless query.present?
12 13