diff options
author | Ahmad Sherif <me@ahmadsherif.com> | 2018-02-05 12:26:25 +0100 |
---|---|---|
committer | Ahmad Sherif <me@ahmadsherif.com> | 2018-02-05 12:29:02 +0100 |
commit | be26c4e728a2704d79a17df0edf84689b44eebd6 (patch) | |
tree | b422620fd9d036f6aa90959cd9a81b5ad1e433f6 /lib/gitlab/gitaly_client | |
parent | 19277271be890c1f836c38f2ccd5caa40c5765e2 (diff) | |
download | gitlab-ce-be26c4e728a2704d79a17df0edf84689b44eebd6.tar.gz |
Encode GitalyClient::WikiPage attributes to UTF-8fix/gitaly-wiki-encoding-issues
Diffstat (limited to 'lib/gitlab/gitaly_client')
-rw-r--r-- | lib/gitlab/gitaly_client/wiki_page.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/gitlab/gitaly_client/wiki_page.rb b/lib/gitlab/gitaly_client/wiki_page.rb index 7339468e911..a02d15db5dd 100644 --- a/lib/gitlab/gitaly_client/wiki_page.rb +++ b/lib/gitlab/gitaly_client/wiki_page.rb @@ -4,6 +4,7 @@ module Gitlab ATTRS = %i(title format url_path path name historical raw_data).freeze include AttributesBag + include Gitlab::EncodingHelper def initialize(params) super @@ -11,6 +12,10 @@ module Gitlab # All gRPC strings in a response are frozen, so we get an unfrozen # version here so appending to `raw_data` doesn't blow up. @raw_data = @raw_data.dup + + @title = encode_utf8(@title) + @path = encode_utf8(@path) + @name = encode_utf8(@name) end def historical? |