# HG changeset patch # User raph # Date 1263402921 -3600 # Node ID dda94db1149a4ec91950a153dab9bd863601dc4d # Parent fe91eb717a96460481e9196ada907cd1a09447c4 add default case in upload mime decoding (assume text) diff -r fe91eb717a96 -r dda94db1149a src/cm/converters/__init__.py --- a/src/cm/converters/__init__.py Mon Jan 11 16:29:48 2010 +0100 +++ b/src/cm/converters/__init__.py Wed Jan 13 18:15:21 2010 +0100 @@ -35,14 +35,6 @@ converted_input = pandoc_convert(xhtml_input, 'html', format) ############################## - # anything looks like text -> markdown - elif mime_type in ['text/plain', - 'text/english', - 'text/enriched' - ]: - converted_input = to_unicode(input) - - ############################## # anything looks like code: put them into markdown citation elif mime_type.startswith('text/x-') or mime_type in ['application/x-latex', 'application/x-ruby', @@ -56,6 +48,18 @@ converted_input = input else: converted_input = pandoc_convert(input, 'html', format) + ############################## + # anything looks like text -> markdown + elif mime_type in ['text/plain', + 'text/english', + 'text/enriched' + ]: + converted_input = to_unicode(input) + ############################## + # default case: assume it's text + else: + converted_input = to_unicode(input) + return converted_input, attachs