diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2006-02-17 17:56:46 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2006-02-17 17:56:46 +0000 |
| commit | b3f99ec9fefaaac1d9bbd7c99d09226623cb57e5 (patch) | |
| tree | 22a2913424d0894424fb15018132994e02b5309a | |
| parent | 15f57d8c55d74e41e8102ccad27fcc7d73a67771 (diff) | |
Fixed #1366 -- Static-file view now escapes file names. Thanks, Kieran Holland
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2322 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/views/static.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/django/views/static.py b/django/views/static.py index 01eaec8990..536720f5e8 100644 --- a/django/views/static.py +++ b/django/views/static.py @@ -56,13 +56,13 @@ DEFAULT_DIRECTORY_INDEX_TEMPLATE = """ <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Language" content="en-us" /> <meta name="robots" content="NONE,NOARCHIVE" /> - <title>Index of {{ directory }}</title> + <title>Index of {{ directory|escape }}</title> </head> <body> - <h1>Index of {{ directory }}</h1> + <h1>Index of {{ directory|escape }}</h1> <ul> {% for f in file_list %} - <li><a href="{{ f }}">{{ f }}</a></li> + <li><a href="{{ f|urlencode }}">{{ f|escape }}</a></li> {% endfor %} </ul> </body> |
