diff --git a/rhodecode/lib/diffs.py b/rhodecode/lib/diffs.py --- a/rhodecode/lib/diffs.py +++ b/rhodecode/lib/diffs.py @@ -27,7 +27,6 @@ import re import difflib -import markupsafe import logging from itertools import tee, imap @@ -171,7 +170,9 @@ class DiffProcessor(object): self.differ = self._highlight_line_udiff def escaper(self, string): - return markupsafe.escape(string) + return string.replace('&', '&')\ + .replace('<', '<')\ + .replace('>', '>') def copy_iterator(self): """ @@ -300,6 +301,7 @@ class DiffProcessor(object): Parse the diff an return data for the template. """ lineiter = self.lines + files = [] try: line = lineiter.next() @@ -323,6 +325,7 @@ class DiffProcessor(object): }) line = lineiter.next() + while line: match = self._chunk_re.match(line) if not match: @@ -551,6 +554,7 @@ class DiffProcessor(object): _html.append('''\n\t\t
%(code)s\n''' % { 'code': change['line'] }) + _html.append('''\t''') _html.append('''\n\n''') _html.append('''''')