Description: 'jinja2.escape' is deprecated and will be removed in
 Jinja 3.1. Import 'markupsafe.escape' instead.

Author: Klaus Koder
Forwarded: not-needed

--- a/pagure/doc_utils.py
+++ b/pagure/doc_utils.py
@@ -15,7 +15,10 @@ from __future__ import unicode_literals,
 import docutils
 import docutils.core
 import docutils.examples
-import jinja2
+try:
+    from jinja2 import escape
+except ImportError:
+    from markupsafe import escape
 import kitchen.text.converters as ktc
 import markupsafe
 import textwrap
@@ -84,7 +87,7 @@ def convert_doc(rst_string, view_file_ur
             source=rst, writer_name="html", settings_overrides=overrides
         )
     except Exception:
-        return "<pre>%s</pre>" % jinja2.escape(rst)
+        return "<pre>%s</pre>" % escape(rst)
 
     else:
 
@@ -110,7 +113,7 @@ def convert_readme(content, ext, view_fi
         safe = True
     elif not ext or (ext and ext in [".text", ".txt"]):
         safe = True
-        output = "<pre>%s</pre>" % jinja2.escape(output)
+        output = "<pre>%s</pre>" % escape(output)
     return output, safe
 
 
