diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2014-07-31 13:22:46 +0400 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2014-08-11 14:18:07 +0400 |
commit | 8265d43d016d4bcd67ce1f7cb452a239953cf8bd (patch) | |
tree | 4b09eaa8b1f86e8503badf57584117b25489d8f1 /app | |
parent | e794b561330070465a67ec57bc65069e12b78ef5 (diff) |
Force of markup output to be the input encoding
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/application_helper.rb | 3 |
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 |