diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-06-26 16:57:09 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-06-26 16:57:09 +0000 |
commit | 6529035ee128c9b995a7a85d347f20ed1412f3ab (patch) | |
tree | 733c327486b8187c5927030eae9d157c519e8e68 /lib | |
parent | 7f6ac407ef11b94a3e99e4a712320f3a6faa22ec (diff) | |
download | redmine-6529035ee128c9b995a7a85d347f20ed1412f3ab.tar.gz redmine-6529035ee128c9b995a7a85d347f20ed1412f3ab.zip |
Fixed that wiki diff may produce html (#11209).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9895 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/helpers/diff.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/redmine/helpers/diff.rb b/lib/redmine/helpers/diff.rb index b11a5692e..86c87e9f9 100644 --- a/lib/redmine/helpers/diff.rb +++ b/lib/redmine/helpers/diff.rb @@ -50,16 +50,17 @@ module Redmine words_add += 1 else del_at = pos unless del_at - deleted << ' ' + h(change[2]) + deleted << ' ' unless deleted.empty? + deleted << h(change[2]) words_del += 1 end end if add_at - words[add_at] = '<span class="diff_in">' + words[add_at] - words[add_to] = words[add_to] + '</span>' + words[add_at] = '<span class="diff_in">'.html_safe + words[add_at] + words[add_to] = words[add_to] + '</span>'.html_safe end if del_at - words.insert del_at - del_off + dels + words_add, '<span class="diff_out">' + deleted + '</span>' + words.insert del_at - del_off + dels + words_add, '<span class="diff_out">'.html_safe + deleted + '</span>'.html_safe dels += 1 del_off += words_del words_del = 0 |