Fix "500: Encoding error" on blame view

This change forces encoding of source line data into UTF-8 and thus
fixes the encoding error at least partially. The issue is described in
https://gitlab.com/gitlab-org/gitlab-ce/issues/894
This commit is contained in:
Timo Lilja 2015-01-17 16:15:20 +02:00
parent ada6c6080b
commit 09152bad0c

View file

@ -30,5 +30,5 @@
%code %code
:erb :erb
<% lines.each do |line| %> <% lines.each do |line| %>
<%= highlight(@blob.name, line, true).html_safe %> <%= highlight(@blob.name, line.force_encoding("utf-8"), true).html_safe %>
<% end %> <% end %>