Changeset - ba7b8dfac7d5
[Not reviewed]
default
0 1 0
Marcin Kuzminski - 12 years ago 2013-06-27 23:53:57
marcin@python-works.com
2way compare: fixed missing "<" escape code
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/files.py
Show inline comments
 
@@ -645,49 +645,49 @@ class FilesController(BaseRepoController
 
                                                   repo=c.rhodecode_repo)
 
                    node2 = FileNode(f_path, '', changeset=c.changeset_2)
 
            else:
 
                c.changeset_2 = EmptyChangeset(repo=c.rhodecode_repo)
 
                node2 = FileNode(f_path, '', changeset=c.changeset_2)
 
        except (RepositoryError, NodeError):
 
            log.error(traceback.format_exc())
 
            return redirect(url('files_home', repo_name=c.repo_name,
 
                                f_path=f_path))
 
        if node2.is_binary:
 
            node2_content = 'binary file'
 
        else:
 
            node2_content = node2.content
 

	
 
        if node1.is_binary:
 
            node1_content = 'binary file'
 
        else:
 
            node1_content = node1.content
 

	
 
        html_escape_table = {
 
            "&": "\u0026",
 
            '"': "\u0022",
 
            "'": "\u0027",
 
            ">": "\u003e",
 
            "<": "\<",
 
            "<": "\u003c",
 
            '\\': "\u005c",
 
            '\n': '\\n'
 
        }
 

	
 
        c.orig1 = h.html_escape((node1_content), html_escape_table)
 
        c.orig2 = h.html_escape((node2_content), html_escape_table)
 
        c.node1 = node1
 
        c.node2 = node2
 
        c.cs1 = c.changeset_1
 
        c.cs2 = c.changeset_2
 

	
 
        return render('files/diff_2way.html')
 

	
 
    def _get_node_history(self, cs, f_path, changesets=None):
 
        """
 
        get changesets history for given node
 

	
 
        :param cs: changeset to calculate history
 
        :param f_path: path for node to calculate history for
 
        :param changesets: if passed don't calculate history and take
 
            changesets defined in this list
 
        """
 
        # calculate history based on tip
 
        tip_cs = c.rhodecode_repo.get_changeset()
0 comments (0 inline, 0 general)