summaryrefslogtreecommitdiff
path: root/lib/gitlab/search_results.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/search_results.rb')
-rw-r--r--lib/gitlab/search_results.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/search_results.rb b/lib/gitlab/search_results.rb
index 757ef71b95a..1e45d074e0a 100644
--- a/lib/gitlab/search_results.rb
+++ b/lib/gitlab/search_results.rb
@@ -7,8 +7,8 @@ module Gitlab
def initialize(opts = {})
@id = opts.fetch(:id, nil)
- @filename = opts.fetch(:filename, nil)
- @basename = opts.fetch(:basename, nil)
+ @filename = encode_utf8(opts.fetch(:filename, nil))
+ @basename = encode_utf8(opts.fetch(:basename, nil))
@ref = opts.fetch(:ref, nil)
@startline = opts.fetch(:startline, nil)
@data = encode_utf8(opts.fetch(:data, nil))