remove encode lib, clean all encoded area.
This commit is contained in:
parent
96211b01a8
commit
f1ac2a616b
10 changed files with 10 additions and 73 deletions
|
@ -1,7 +1,6 @@
|
|||
# Controller for viewing a file's blame
|
||||
class BlobController < ProjectResourceController
|
||||
include ExtractsPath
|
||||
include Gitlab::Encode
|
||||
|
||||
# Authorize
|
||||
before_filter :authorize_read_project!
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
class RefsController < ProjectResourceController
|
||||
include Gitlab::Encode
|
||||
|
||||
# Authorize
|
||||
before_filter :authorize_read_project!
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
class Commit
|
||||
include ActiveModel::Conversion
|
||||
include Gitlab::Encode
|
||||
include StaticModel
|
||||
extend ActiveModel::Naming
|
||||
|
||||
|
@ -112,7 +111,7 @@ class Commit
|
|||
end
|
||||
|
||||
def safe_message
|
||||
@safe_message ||= utf8 message
|
||||
@safe_message ||= message
|
||||
end
|
||||
|
||||
def created_at
|
||||
|
@ -124,7 +123,7 @@ class Commit
|
|||
end
|
||||
|
||||
def author_name
|
||||
utf8 author.name
|
||||
author.name
|
||||
end
|
||||
|
||||
# Was this commit committed by a different person than the original author?
|
||||
|
@ -133,7 +132,7 @@ class Commit
|
|||
end
|
||||
|
||||
def committer_name
|
||||
utf8 committer.name
|
||||
committer.name
|
||||
end
|
||||
|
||||
def committer_email
|
||||
|
|
|
@ -8,7 +8,7 @@ class Tree
|
|||
def initialize(raw_tree, project, ref = nil, path = nil)
|
||||
@project, @ref, @path = project, ref, path
|
||||
@tree = if path.present?
|
||||
raw_tree / path.dup.force_encoding('ascii-8bit')
|
||||
raw_tree / path
|
||||
else
|
||||
raw_tree
|
||||
end
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
.file_title
|
||||
%i.icon-file
|
||||
%span.file_name
|
||||
= @tree.name.force_encoding('utf-8')
|
||||
= @tree.name
|
||||
%small= number_to_human_size @tree.size
|
||||
%span.options= render "tree/blob_actions"
|
||||
.file_content.blame
|
||||
|
@ -32,4 +32,4 @@
|
|||
%td.lines
|
||||
= preserve do
|
||||
%pre
|
||||
= Gitlab::Encode.utf8 lines.join("\n")
|
||||
= lines.join("\n")
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
.file_title
|
||||
%i.icon-file
|
||||
%span.file_name
|
||||
= blob.name.force_encoding('utf-8')
|
||||
= blob.name
|
||||
%small= number_to_human_size blob.size
|
||||
%span.options= render "tree/blob_actions"
|
||||
- if blob.text?
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
.file_title
|
||||
%i.icon-file
|
||||
%span.file_name
|
||||
= "#{@tree.path.force_encoding('utf-8')} (#{@ref})"
|
||||
= "#{@tree.path} (#{@ref})"
|
||||
.file_content.code
|
||||
#editor= @tree.data
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue