diff --git a/rhodecode/lib/helpers.py b/rhodecode/lib/helpers.py --- a/rhodecode/lib/helpers.py +++ b/rhodecode/lib/helpers.py @@ -36,7 +36,7 @@ from webhelpers.html.tags import _set_in from vcs.utils.annotate import annotate_highlight from rhodecode.lib.utils import repo_name_slug -from rhodecode.lib import str2bool +from rhodecode.lib import str2bool, safe_unicode def _reset(name, value=None, id=NotGiven, type="reset", **attrs): """ @@ -192,7 +192,7 @@ class _FilesBreadCrumbs(object): def __call__(self, repo_name, rev, paths): if isinstance(paths, str): - paths = paths.decode('utf-8', 'replace') + paths = safe_unicode(paths) url_l = [link_to(repo_name, url('files_home', repo_name=repo_name, revision=rev, f_path=''))] @@ -680,7 +680,7 @@ def changed_tooltip(nodes): suf = '' if len(nodes) > 30: suf = '
' + _(' and %s more') % (len(nodes) - 30) - return literal(pref + '
'.join([x.path.decode('utf-8', 'replace') for x in nodes[:30]]) + suf) + return literal(pref + '
'.join([safe_unicode(x.path) for x in nodes[:30]]) + suf) else: return ': ' + _('No Files')