diff --git a/pagure/doc_utils.py b/pagure/doc_utils.py index 0145a80..9d0d483 100644 --- a/pagure/doc_utils.py +++ b/pagure/doc_utils.py @@ -12,6 +12,7 @@ import docutils import docutils.core import docutils.examples +import jinja2 import kitchen.text.converters as ktc import markupsafe import textwrap @@ -80,7 +81,7 @@ def convert_doc(rst_string, view_file_url=None): writer_name='html', settings_overrides=overrides) except: - return '
%s
' % rst + return '
%s
' % jinja2.escape(rst) else: @@ -106,7 +107,7 @@ def convert_readme(content, ext, view_file_url=None): safe = True elif not ext or (ext and ext in ['.text', '.txt']): safe = True - output = '
%s
' % output + output = '
%s
' % jinja2.escape(output) return output, safe