]> source.dussan.org Git - redmine.git/commitdiff
scm: return if str.blank? in to_utf8(str).
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 28 Feb 2011 08:03:43 +0000 (08:03 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 28 Feb 2011 08:03:43 +0000 (08:03 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4960 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/repositories_helper.rb
app/models/changeset.rb

index 074dfa41a4cc861f619706e97b38dfdc8d1b83f0..f19d993ff24c44863221f7b0bd1ddcb8c8673a1c 100644 (file)
@@ -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
index 0a60813935a2d140e9abc74397154b826113466b..5e1ee19ba1ecd42b38f75333348f8cebbbde46ab 100644 (file)
@@ -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