From ed14c30b2b90429dbf63fdd0f56d2318f4f1eaab Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Oct 22 2015 11:09:46 +0000 Subject: More decoding to UTF-8 to handle READMEs --- diff --git a/pagure/doc_utils.py b/pagure/doc_utils.py index d2c5b58..a707d36 100644 --- a/pagure/doc_utils.py +++ b/pagure/doc_utils.py @@ -97,9 +97,9 @@ def convert_readme(content, ext, view_file_url=None): safe = False if ext and ext in ['.rst']: safe = True - output = convert_doc(content, view_file_url) + output = convert_doc(content.decode('utf-8'), view_file_url) elif ext and ext in ['.mk', '.md']: - output = markdown.markdown(content) + output = markdown.markdown(content.decode('utf-8')) safe = True elif not ext or (ext and ext in ['.text', '.txt']): safe = True