Browse Source

HUE-3098 [filebrowser] Avoid double-encoding files with internal mime type

Jenny Kim 10 years ago
parent
commit
bb5dfc6
1 changed files with 1 additions and 2 deletions
  1. 1 2
      apps/filebrowser/src/filebrowser/views.py

+ 1 - 2
apps/filebrowser/src/filebrowser/views.py

@@ -539,8 +539,7 @@ def display(request, path):
       mimetype = mimetypes.guess_type(path)[0]
       mimetype = mimetypes.guess_type(path)[0]
 
 
       if mimetype is not None and INLINE_DISPLAY_MIMETYPE.search(mimetype):
       if mimetype is not None and INLINE_DISPLAY_MIMETYPE.search(mimetype):
-        path_enc = urlencode(path)
-        return redirect(reverse('filebrowser.views.download', args=[path_enc]) + '?disposition=inline')
+        return redirect(reverse('filebrowser.views.download', args=[path]) + '?disposition=inline')
 
 
     stats = request.fs.stats(path)
     stats = request.fs.stats(path)
     encoding = request.GET.get('encoding') or i18n.get_site_encoding()
     encoding = request.GET.get('encoding') or i18n.get_site_encoding()