Skip to content

Commit

Permalink
Fixes #11207 Autocomplete on scoped search displays some characters i…
Browse files Browse the repository at this point in the history
…ncorrectly
  • Loading branch information
John Mitsch committed Aug 12, 2015
1 parent 936612f commit 8797538
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -11,7 +11,7 @@ def auto_complete_search
category = (['and', 'or', 'not', 'has'].include?(item.to_s.sub(/^.*\s+/, ''))) ? _('Operators') : ''
part = item.to_s.sub(/^.*\b(and|or)\b/i) { |match| match.sub(/^.*\s+/, '') }
completed = item.to_s.chomp(part)
{:completed => CGI.escapeHTML(completed), :part => CGI.escapeHTML(part), :label => item, :category => category}
{:completed => completed, :part => part, :label => item, :category => category}
end
rescue ScopedSearch::QueryNotSupported => e
items = [{:error => e.to_s}]
Expand Down

0 comments on commit 8797538

Please sign in to comment.