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
This commit is contained in:
Toshi MARUYAMA 2013-03-07 10:17:45 +00:00
parent 0d141eef32
commit 72539451aa
1 changed files with 6 additions and 0 deletions

View 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