Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #1366 -- Static-file view now escapes file names. Thanks, Kiera…

…n Holland

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2322 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit b3f99ec9fefaaac1d9bbd7c99d09226623cb57e5 1 parent 15f57d8
Adrian Holovaty authored February 17, 2006

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  django/views/static.py
6  django/views/static.py
@@ -56,13 +56,13 @@ def serve(request, path, document_root=None, show_indexes=False):
56 56
     <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
57 57
     <meta http-equiv="Content-Language" content="en-us" />
58 58
     <meta name="robots" content="NONE,NOARCHIVE" />
59  
-    <title>Index of {{ directory }}</title>
  59
+    <title>Index of {{ directory|escape }}</title>
60 60
   </head>
61 61
   <body>
62  
-    <h1>Index of {{ directory }}</h1>
  62
+    <h1>Index of {{ directory|escape }}</h1>
63 63
     <ul>
64 64
       {% for f in file_list %}
65  
-      <li><a href="{{ f }}">{{ f }}</a></li>
  65
+      <li><a href="{{ f|urlencode }}">{{ f|escape }}</a></li>
66 66
       {% endfor %}
67 67
     </ul>
68 68
   </body>

0 notes on commit b3f99ec

Please sign in to comment.
Something went wrong with that request. Please try again.