From 49d1b7860d9f15c5481c733c2040bcc5a1f63392 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 17 Jan 2014 08:49:15 +0000 Subject: [PATCH] fix pdf urls --- pandora/text/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora/text/views.py b/pandora/text/views.py index ce97e83e..9d96a918 100644 --- a/pandora/text/views.py +++ b/pandora/text/views.py @@ -395,6 +395,7 @@ def pdf_viewer(request, id): return render_to_json_response(response) def pdf(request, id): + id = id.replace('_', ' ').replace('\t', '_') text = get_text_or_404_json(id) if text.type == 'pdf' and text.file and not text.uploading: return HttpFileResponse(text.file.path, content_type='application/pdf')