From 09152bad0c3dd950d3d6dd0c0ea7f31056df1fdf Mon Sep 17 00:00:00 2001 From: Timo Lilja Date: Sat, 17 Jan 2015 16:15:20 +0200 Subject: 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 --- app/views/projects/blame/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 %> -- cgit v1.2.1