Commit 61b16dcb authored by Laure Bourgois's avatar Laure Bourgois
Browse files

returning to former guess_mimetype_and_encoding implementation

parent 54b7f8a43ff2
......@@ -78,9 +78,7 @@ def guess_mimetype_and_encoding(format=None, encoding=None, data=None,
else:
format = u'application/octet-stream'
if not encoding and data and format and is_text_mimetype(format):
encoding = guess_encoding(data, fallbackencoding)
if not encoding and data and format and not is_text_mimetype(format):
encoding = DEFAULT_ENCODING
encoding = guess_encoding(data, fallbackencoding)
return format, encoding
def html_escape(data):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment