diff --git a/kallithea/controllers/changelog.py b/kallithea/controllers/changelog.py --- a/kallithea/controllers/changelog.py +++ b/kallithea/controllers/changelog.py @@ -83,8 +83,7 @@ class ChangelogController(BaseRepoContro try: return c.db_repo_scm_instance.get_changeset(rev) except EmptyRepositoryError as e: - h.flash(h.literal(_('There are no changesets yet')), - category='error') + h.flash(_('There are no changesets yet'), category='error') except RepositoryError as e: log.error(traceback.format_exc()) h.flash(safe_str(e), category='error') diff --git a/kallithea/controllers/pullrequests.py b/kallithea/controllers/pullrequests.py --- a/kallithea/controllers/pullrequests.py +++ b/kallithea/controllers/pullrequests.py @@ -235,8 +235,7 @@ class PullrequestsController(BaseRepoCon try: org_scm_instance.get_changeset() except EmptyRepositoryError as e: - h.flash(h.literal(_('There are no changesets yet')), - category='warning') + h.flash(_('There are no changesets yet'), category='warning') redirect(url('summary_home', repo_name=org_repo.repo_name)) org_rev = request.GET.get('rev_end') diff --git a/kallithea/lib/auth.py b/kallithea/lib/auth.py --- a/kallithea/lib/auth.py +++ b/kallithea/lib/auth.py @@ -719,7 +719,7 @@ def redirect_to_login(message=None): from kallithea.lib import helpers as h p = request.path_qs if message: - h.flash(h.literal(message), category='warning') + h.flash(message, category='warning') log.debug('Redirecting to login page, origin: %s', p) return redirect(url('login_home', came_from=p)) diff --git a/kallithea/lib/base.py b/kallithea/lib/base.py --- a/kallithea/lib/base.py +++ b/kallithea/lib/base.py @@ -487,7 +487,7 @@ class BaseRepoController(BaseController) log.error('%s this repository is present in database but it ' 'cannot be created as an scm instance', c.repo_name) from kallithea.lib import helpers as h - h.flash(h.literal(_('Repository not found in the filesystem')), + h.flash(_('Repository not found in the filesystem'), category='error') raise paste.httpexceptions.HTTPNotFound() @@ -509,12 +509,11 @@ class BaseRepoController(BaseController) except EmptyRepositoryError as e: if returnempty: return repo.scm_instance.EMPTY_CHANGESET - h.flash(h.literal(_('There are no changesets yet')), - category='error') + h.flash(_('There are no changesets yet'), category='error') raise webob.exc.HTTPNotFound() except ChangesetDoesNotExistError as e: - h.flash(h.literal(_('Changeset for %s %s not found in %s') % - (ref_type, ref_name, repo.repo_name)), + h.flash(_('Changeset for %s %s not found in %s') % + (ref_type, ref_name, repo.repo_name), category='error') raise webob.exc.HTTPNotFound() except RepositoryError as e: diff --git a/kallithea/templates/admin/settings/settings_system_update.html b/kallithea/templates/admin/settings/settings_system_update.html --- a/kallithea/templates/admin/settings/settings_system_update.html +++ b/kallithea/templates/admin/settings/settings_system_update.html @@ -7,7 +7,7 @@ %if c.should_upgrade: A new version is available: %if c.latest_data.get('title'): - ${h.literal(c.latest_data['title'])} + ${c.latest_data['title']} %else: ${c.latest_ver} %endif diff --git a/kallithea/templates/base/default_perms_box.html b/kallithea/templates/base/default_perms_box.html --- a/kallithea/templates/base/default_perms_box.html +++ b/kallithea/templates/base/default_perms_box.html @@ -30,7 +30,7 @@ ${h.form(form_url, method='put')}