Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-ce
Commits
f33cf247
Commit
f33cf247
authored
May 19, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #833 from Nek-/patch-utf8
Added force utf8 encoding
parents
5d240827
8c7c43b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
app/views/refs/_tree.html.haml
app/views/refs/_tree.html.haml
+2
-2
app/views/refs/_tree_file.html.haml
app/views/refs/_tree_file.html.haml
+3
-3
No files found.
app/views/refs/_tree.html.haml
View file @
f33cf247
...
@@ -42,9 +42,9 @@
...
@@ -42,9 +42,9 @@
.readme
.readme
-
if
content
.
name
=~
/\.(md|markdown)$/i
-
if
content
.
name
=~
/\.(md|markdown)$/i
=
preserve
do
=
preserve
do
=
markdown
(
content
.
data
)
=
markdown
(
content
.
data
.
force_encoding
(
'UTF-8'
)
)
-
else
-
else
=
simple_format
(
content
.
data
)
=
simple_format
(
content
.
data
.
force_encoding
(
'UTF-8'
)
)
-
if
params
[
:path
]
-
if
params
[
:path
]
-
history_path
=
tree_file_project_ref_path
(
@project
,
@ref
,
params
[
:path
])
-
history_path
=
tree_file_project_ref_path
(
@project
,
@ref
,
params
[
:path
])
...
...
app/views/refs/_tree_file.html.haml
View file @
f33cf247
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
#tree-readme-holder
#tree-readme-holder
.readme
.readme
=
preserve
do
=
preserve
do
=
markdown
(
file
.
data
)
=
markdown
(
file
.
data
.
force_encoding
(
'UTF-8'
)
)
-
else
-
else
.view_file_content
.view_file_content
-
unless
file
.
empty?
-
unless
file
.
empty?
...
@@ -28,9 +28,9 @@
...
@@ -28,9 +28,9 @@
%img
{
:src
=>
"data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"
}
%img
{
:src
=>
"data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"
}
-
else
-
else
%center
%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
%div
%br
%br
=
image_tag
"download.png"
,
:width
=>
64
=
image_tag
"download.png"
,
:width
=>
64
%h3
%h3
Download (
#{
file
.
mb_size
}
)
Download (
#{
file
.
mb_size
}
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment