Commit 202807c21a61696ad50aadf43781ca15b9deaede

Authored by Saito
1 parent c71a76e7

remove detect_enoding. detect_encoding means force_encoding to the file.data's e…

…ncoding, not encoding to utf8. will cause encoding problem.
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.detect_encoding!)
  45 + = markdown(content.data)
46 46 - else
47   - = simple_format(content.data.detect_encoding!)
  47 + = simple_format(content.data)
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
... ... @@ -13,7 +13,7 @@
13 13 #tree-readme-holder
14 14 .readme
15 15 = preserve do
16   - = markdown(file.data.detect_encoding!)
  16 + = markdown(file.data)
17 17 - else
18 18 .view_file_content
19 19 - unless file.empty?
... ...