##// END OF EJS Templates
scm: return if str.blank? in to_utf8(str)....
Toshi MARUYAMA -
r4840:f03e338880e9
parent child
Show More
@@ -117,6 +117,7 module RepositoriesHelper
117 end
117 end
118
118
119 def to_utf8(str)
119 def to_utf8(str)
120 return str if str.blank?
120 if str.respond_to?(:force_encoding)
121 if str.respond_to?(:force_encoding)
121 str.force_encoding('UTF-8')
122 str.force_encoding('UTF-8')
122 else
123 else
@@ -247,6 +247,7 class Changeset < ActiveRecord::Base
247 end
247 end
248
248
249 def self.to_utf8(str)
249 def self.to_utf8(str)
250 return str if str.blank?
250 encoding = Setting.commit_logs_encoding.to_s.strip
251 encoding = Setting.commit_logs_encoding.to_s.strip
251 unless encoding.blank? || encoding == 'UTF-8'
252 unless encoding.blank? || encoding == 'UTF-8'
252 begin
253 begin
General Comments 0
You need to be logged in to leave comments. Login now