diff --git a/pagure/templates/blame.html b/pagure/templates/blame.html
index 030d072..dd2afe1 100644
--- a/pagure/templates/blame.html
+++ b/pagure/templates/blame.html
@@ -165,11 +165,7 @@ No content found in this repository
README{{readme_ext}}
- {% if safe %}
- {{ readme | noJS |safe }}
- {% else %}
- {{ readme | noJS }}
- {% endif %}
+ {{ readme | noJS | safe }}
{% endif %}
diff --git a/pagure/templates/file.html b/pagure/templates/file.html
index c2c6595..75a9f7a 100644
--- a/pagure/templates/file.html
+++ b/pagure/templates/file.html
@@ -165,7 +165,7 @@
{% elif output_type == 'markup' %}
{% autoescape false %}
- {{ content | noJS }}
+ {{ content | noJS | safe }}
{% endautoescape %}
{% elif output_type == 'image' %}
@@ -235,11 +235,7 @@ No content found in this repository
README{{readme_ext}}
- {% if safe %}
- {{ readme | noJS |safe }}
- {% else %}
- {{ readme | noJS }}
- {% endif %}
+ {{ readme | noJS | safe }}
{% endif %}
diff --git a/pagure/templates/pull_request.html b/pagure/templates/pull_request.html
index 3f80852..3b21acb 100644
--- a/pagure/templates/pull_request.html
+++ b/pagure/templates/pull_request.html
@@ -3,7 +3,7 @@
{% block title %}
{%- if pull_request -%}
- PR#{{ requestid }}: {{ pull_request.title | noJS(ignore="img")}}
+ PR#{{ requestid }}: {{ pull_request.title | noJS(ignore="img") | safe }}
{%- elif form and (g.repo_committer or remote_git) -%}
Create new Pull Request for {{ branch_to }}
{%- elif origin == 'compare_commits' -%}
diff --git a/pagure/templates/repo_info.html b/pagure/templates/repo_info.html
index 36af040..486994e 100644
--- a/pagure/templates/repo_info.html
+++ b/pagure/templates/repo_info.html
@@ -35,11 +35,7 @@ git push -u origin master
{% if readme %}
- {% if safe %}
- {{ readme | noJS |safe }}
- {% else %}
- {{ readme | noJS }}
- {% endif %}
+ {{ readme | noJS | safe }}
{% else %}
diff --git a/tests/test_pagure_flask_ui_app.py b/tests/test_pagure_flask_ui_app.py
index 93a9f5f..d7863e7 100644
--- a/tests/test_pagure_flask_ui_app.py
+++ b/tests/test_pagure_flask_ui_app.py
@@ -415,7 +415,7 @@ class PagureFlaskApptests(tests.Modeltests):
output.data if six.PY2 else output.data.decode('utf-8'))
self.assertIn(
'''
- project-1
+ project-1
Prõjéctö #1
''', output.data if six.PY2 else output.data.decode('utf-8'))
@@ -432,7 +432,7 @@ class PagureFlaskApptests(tests.Modeltests):
output.data if six.PY2 else output.data.decode('utf-8'))
self.assertIn(
'''
- project-2
+ project-2
Мой первый суперский репозиторий
''', output.data if six.PY2 else output.data.decode('utf-8'))