summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Baarsen <jeroenvanbaarsen@gmail.com>2014-08-16 14:55:36 +0200
committerJeroen van Baarsen <jeroenvanbaarsen@gmail.com>2014-08-16 14:58:53 +0200
commit1b14864549445a8199900c10837c597453a0581f (patch)
tree18a4c579fc876042fef586436f6e05decbc725a2
parentcb33279a0f36f2c6a70d5ecf00bbd8749b92c51b (diff)
downloadgitlab-ce-1b14864549445a8199900c10837c597453a0581f.tar.gz
Set charset encoding to UTF-8 for snippets
Fixes #2678 Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
-rw-r--r--app/controllers/projects/snippets_controller.rb2
-rw-r--r--app/controllers/snippets_controller.rb2
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
)