Commit 39def0dcbb17a3f5883d6cb1965f815b537e5890
1 parent
eb5749ed
Exists in
master
and in
4 other branches
Better fix for encoding problems on rendering of inline file visualizations like README files.
Showing
3 changed files
with
6 additions
and
3 deletions
Show diff stats
app/views/refs/_tree.html.haml
| ... | ... | @@ -42,9 +42,9 @@ |
| 42 | 42 | .readme |
| 43 | 43 | - if content.name =~ /\.(md|markdown)$/i |
| 44 | 44 | = preserve do |
| 45 | - = markdown(content.data.force_encoding('UTF-8')) | |
| 45 | + = markdown(content.data.detect_encoding!) | |
| 46 | 46 | - else |
| 47 | - = simple_format(content.data.force_encoding('UTF-8')) | |
| 47 | + = simple_format(content.data.detect_encoding!) | |
| 48 | 48 | |
| 49 | 49 | - if params[:path] |
| 50 | 50 | - history_path = tree_file_project_ref_path(@project, @ref, params[:path]) | ... | ... |
app/views/refs/_tree_file.html.haml