Skip to content
Snippets Groups Projects
Commit aa58533f authored by Toshi MARUYAMA's avatar Toshi MARUYAMA Committed by Eric Davis
Browse files

scm: return if str.blank? in to_utf8(str).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4960 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 65d0bb9c
No related merge requests found
......@@ -117,6 +117,7 @@ module RepositoriesHelper
end
def to_utf8(str)
return str if str.blank?
if str.respond_to?(:force_encoding)
str.force_encoding('UTF-8')
else
......
......@@ -247,6 +247,7 @@ class Changeset < ActiveRecord::Base
end
def self.to_utf8(str)
return str if str.blank?
encoding = Setting.commit_logs_encoding.to_s.strip
unless encoding.blank? || encoding == 'UTF-8'
begin
......
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