From: Toshi MARUYAMA Date: Thu, 7 Mar 2013 10:17:45 +0000 (+0000) Subject: set html encoding utf8 at Diff class (#12641) X-Git-Tag: 2.4.0~573 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=72539451aab45ee2692376bf087d06396b4956ca;p=redmine.git set html encoding utf8 at Diff class (#12641) git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11547 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/redmine/unified_diff.rb b/lib/redmine/unified_diff.rb index 450b99ae3..2e15188fa 100644 --- a/lib/redmine/unified_diff.rb +++ b/lib/redmine/unified_diff.rb @@ -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