From 1b14864549445a8199900c10837c597453a0581f Mon Sep 17 00:00:00 2001 From: Jeroen van Baarsen Date: Sat, 16 Aug 2014 14:55:36 +0200 Subject: [PATCH] Set charset encoding to UTF-8 for snippets Fixes #2678 Signed-off-by: Jeroen van Baarsen --- app/controllers/projects/snippets_controller.rb | 2 +- app/controllers/snippets_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/projects/snippets_controller.rb b/app/controllers/projects/snippets_controller.rb index 25026973118..cba058fe214 100644 --- a/app/controllers/projects/snippets_controller.rb +++ b/app/controllers/projects/snippets_controller.rb @@ -63,7 +63,7 @@ class Projects::SnippetsController < Projects::ApplicationController def raw send_data( @snippet.content, - type: "text/plain", + type: 'text/plain; charset=utf-8', disposition: 'inline', filename: @snippet.file_name ) diff --git a/app/controllers/snippets_controller.rb b/app/controllers/snippets_controller.rb index e75db61e680..3927584235e 100644 --- a/app/controllers/snippets_controller.rb +++ b/app/controllers/snippets_controller.rb @@ -86,7 +86,7 @@ class SnippetsController < ApplicationController def raw send_data( @snippet.content, - type: "text/plain", + type: 'text/plain; charset=utf-8', disposition: 'inline', filename: @snippet.file_name ) -- GitLab