summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2013-03-07 10:17:45 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2013-03-07 10:17:45 +0000
commit72539451aab45ee2692376bf087d06396b4956ca (patch)
tree41c3ce5f1d9af43158c1f3b44ffdf54a7a7676fc /lib
parent0d141eef3207da0269814a0d2f81f35386568536 (diff)
downloadredmine-72539451aab45ee2692376bf087d06396b4956ca.tar.gz
redmine-72539451aab45ee2692376bf087d06396b4956ca.zip
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
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/unified_diff.rb6
1 files changed, 6 insertions, 0 deletions
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