Commit f33cf247 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #833 from Nek-/patch-utf8

Added force utf8 encoding
parents 5d240827 8c7c43b9
......@@ -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])
......
......@@ -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})
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment