files(fix): fix render preview for files on online edit
This commit is contained in:
parent
3db0951f77
commit
849641a10a
1 changed files with 2 additions and 3 deletions
|
|
@ -34,6 +34,7 @@ from rhodecode.lib.auth import (
|
|||
)
|
||||
from rhodecode.lib.codeblocks import filenode_as_lines_tokens
|
||||
from rhodecode.lib.index import searcher_from_config
|
||||
from rhodecode.lib.str_utils import safe_bytes
|
||||
from rhodecode.lib.utils2 import str2bool, safe_int, safe_str
|
||||
from rhodecode.lib.vcs.nodes import FileNode
|
||||
from rhodecode.model.db import (
|
||||
|
|
@ -826,9 +827,7 @@ class HomeView(BaseAppView, DataGridAppView):
|
|||
else:
|
||||
self.load_default_context()
|
||||
_render = self.request.get_partial_renderer("rhodecode:templates/files/file_content.mako")
|
||||
|
||||
lines = filenode_as_lines_tokens(FileNode(file_path, text))
|
||||
|
||||
lines = filenode_as_lines_tokens(FileNode(safe_bytes(file_path), text))
|
||||
return _render("render_lines", lines)
|
||||
|
||||
@LoginRequired()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue