diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb index 0dc450b36..80887a937 100644 --- a/app/helpers/repositories_helper.rb +++ b/app/helpers/repositories_helper.rb @@ -148,6 +148,7 @@ module RepositoriesHelper private :to_utf8_internal def replace_invalid_utf8(str) + return str if str.nil? if str.respond_to?(:force_encoding) str.force_encoding('UTF-8') if ! str.valid_encoding?