diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-05-19 03:34:20 -0700 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-05-19 03:34:20 -0700 |
commit | f33cf247b6387a5a0f33a4ccb4867ab2d2f14d4e (patch) | |
tree | 0fecad0a300478bb756c6906490d406bb7979e27 | |
parent | 5d24082787944e25df4355fc13cf3dd7274a40ea (diff) | |
parent | 8c7c43b94f17f1c8460f0425089dfd5980bbb35f (diff) | |
download | gitlab-ce-f33cf247b6387a5a0f33a4ccb4867ab2d2f14d4e.tar.gz |
Merge pull request #833 from Nek-/patch-utf8
Added force utf8 encoding
-rw-r--r-- | app/views/refs/_tree.html.haml | 4 | ||||
-rw-r--r-- | app/views/refs/_tree_file.html.haml | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/app/views/refs/_tree.html.haml b/app/views/refs/_tree.html.haml index ee2f278693c..137501eaf1e 100644 --- a/app/views/refs/_tree.html.haml +++ b/app/views/refs/_tree.html.haml @@ -42,9 +42,9 @@ .readme - if content.name =~ /\.(md|markdown)$/i = preserve do - = markdown(content.data) + = markdown(content.data.force_encoding('UTF-8')) - else - = simple_format(content.data) + = simple_format(content.data.force_encoding('UTF-8')) - if params[:path] - history_path = tree_file_project_ref_path(@project, @ref, params[:path]) diff --git a/app/views/refs/_tree_file.html.haml b/app/views/refs/_tree_file.html.haml index 768ff5a0446..3fcc37331e7 100644 --- a/app/views/refs/_tree_file.html.haml +++ b/app/views/refs/_tree_file.html.haml @@ -13,7 +13,7 @@ #tree-readme-holder .readme = preserve do - = markdown(file.data) + = markdown(file.data.force_encoding('UTF-8')) - else .view_file_content - unless file.empty? @@ -28,9 +28,9 @@ %img{ :src => "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"} - else %center - = link_to blob_project_ref_path(@project, @ref, :path => params[:path]) do + = link_to blob_project_ref_path(@project, @ref, :path => params[:path]) do %div %br = image_tag "download.png", :width => 64 - %h3 + %h3 Download (#{file.mb_size}) |