Django

Code

Changeset 2322

Show
Ignore:
Timestamp:
02/17/06 11:56:46 (3 years ago)
Author:
adrian
Message:

Fixed #1366 -- Static-file view now escapes file names. Thanks, Kieran Holland

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/views/static.py

    r1452 r2322  
    5757    <meta http-equiv="Content-Language" content="en-us" /> 
    5858    <meta name="robots" content="NONE,NOARCHIVE" /> 
    59     <title>Index of {{ directory }}</title> 
     59    <title>Index of {{ directory|escape }}</title> 
    6060  </head> 
    6161  <body> 
    62     <h1>Index of {{ directory }}</h1> 
     62    <h1>Index of {{ directory|escape }}</h1> 
    6363    <ul> 
    6464      {% for f in file_list %} 
    65       <li><a href="{{ f }}">{{ f }}</a></li> 
     65      <li><a href="{{ f|urlencode }}">{{ f|escape }}</a></li> 
    6666      {% endfor %} 
    6767    </ul>