Fix ascii media type for Python 3. Fix by 宋文武 (iyzsong)
authorChristopher Allan Webber <cwebber@dustycloud.org>
Thu, 25 Feb 2016 01:54:34 +0000 (17:54 -0800)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Thu, 25 Feb 2016 01:54:34 +0000 (17:54 -0800)
mediagoblin/templates/mediagoblin/media_displays/ascii.html

index 56039980c26cdecf6866b4111a1f20564a37d03b..7cef5e804135f2d839889384f33027b0365e20db 100644 (file)
@@ -24,7 +24,7 @@
       <pre>
         {%- autoescape False -%}
         {{- request.app.public_store.get_file(
-               media.media_files['unicode']).read()|string -}}
+               media.media_files['unicode']).read().decode('utf-8')|string -}}
         {%- endautoescape -%}
       </pre>
     </div>