From: Aleksander Ɓukasz Date: Mon, 20 May 2013 14:55:44 +0000 (+0200) Subject: Handling question marks in scan file names X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/972635a65c86025f2f8d05217e93f634b7ed067e Handling question marks in scan file names --- diff --git a/apps/wiki/views.py b/apps/wiki/views.py index f7078922..14817348 100644 --- a/apps/wiki/views.py +++ b/apps/wiki/views.py @@ -210,7 +210,7 @@ def gallery(request, directory): smart_unicode(directory)) def map_to_url(filename): - return "%s/%s" % (base_url, smart_unicode(filename)) + return ("%s/%s" % (base_url, smart_unicode(filename))).replace('?', '%3f') def is_image(filename): return os.path.splitext(f)[1].lower() in (u'.jpg', u'.jpeg', u'.png')