summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-04 04:32:48 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-04 04:32:48 +0000
commit347ce399ab88de6c35a48365e7e8db00ae9aade1 (patch)
treee65ae371cd389df7b7a49611ad3395924932d388
parenta8b4756f2925da0e5ca599a8469fe47445c95425 (diff)
parent09152bad0c3dd950d3d6dd0c0ea7f31056df1fdf (diff)
downloadgitlab-ce-347ce399ab88de6c35a48365e7e8db00ae9aade1.tar.gz
Merge branch 'blame_encoding_error_fix' into 'master'
Fix for a "500: Encoding error" in the blame view What does this MR do? - The change enforces UTF-8 encoding on the source line data obtained from the Git. Are there points in the code the reviewer needs to double check? - The fix might not be enough to fix all encoding error issues in the blame view. There might be similar encoding issues if there are non-UTF-8 encoded names, for example Why was this MR needed? - This change fixes the "500: encoding error" that I get when I try to view the Gitlab source CHANGELOG file. What are the relevant issue numbers / Feature requests? - Gitlab issue #894: https://gitlab.com/gitlab-org/gitlab-ce/issues/894 See merge request !298
-rw-r--r--app/views/projects/blame/show.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml
index c507ecf2e49..51a2f20d1e2 100644
--- a/app/views/projects/blame/show.html.haml
+++ b/app/views/projects/blame/show.html.haml
@@ -30,5 +30,5 @@
%code
:erb
<% lines.each do |line| %>
- <%= highlight(@blob.name, line, true).html_safe %>
+ <%= highlight(@blob.name, line.force_encoding("utf-8"), true).html_safe %>
<% end %>