Ticket #1366: fix_static_view_r2312.diff

File fix_static_view_r2312.diff, 787 bytes (added by django@…, 19 years ago)

escape filenames in static view

  • django/views/static.py

     
    5656    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    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>
    6868  </body>
Back to Top