Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2014-07-31 13:22:46 +0400
committerRobert Schilling <rschilling@student.tugraz.at>2014-08-11 14:18:07 +0400
commit8265d43d016d4bcd67ce1f7cb452a239953cf8bd (patch)
tree4b09eaa8b1f86e8503badf57584117b25489d8f1 /app
parente794b561330070465a67ec57bc65069e12b78ef5 (diff)
Force of markup output to be the input encoding
Diffstat (limited to 'app')
-rw-r--r--app/helpers/application_helper.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index cc49b89191b..e6d50bea4d1 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -221,7 +221,8 @@ module ApplicationHelper
end
def render_markup(file_name, file_content)
- GitHub::Markup.render(file_name, file_content).html_safe
+ GitHub::Markup.render(file_name, file_content).
+ force_encoding(file_content.encoding).html_safe
rescue RuntimeError
simple_format(file_content)
end