]> source.dussan.org Git - redmine.git/commitdiff
set html encoding utf8 at Diff class (#12641)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 7 Mar 2013 10:17:45 +0000 (10:17 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 7 Mar 2013 10:17:45 +0000 (10:17 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11547 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/unified_diff.rb

index 450b99ae3824df700f26a9de2ad92d657f22f3e1..2e15188fa246b74de9fb924d456d3943f691d489 100644 (file)
@@ -260,6 +260,12 @@ module Redmine
     private
 
     def line_to_html(line, offsets)
+      html = line_to_html_raw(line, offsets)
+      html.force_encoding('UTF-8') if html.respond_to?(:force_encoding)
+      html
+    end
+
+    def line_to_html_raw(line, offsets)
       if offsets
         s = ''
         unless offsets.first == 0