Petite amélioration cosmétique...
[progfou.git] / mod_python / index.py
index 384a282..71b4280 100644 (file)
@@ -95,14 +95,15 @@ def dir_content(root, level=0):
     for dir in dirs:
         content += space + u"""<li>"""
         content += u"""<a href="javascript:void(0)" onclick="sw('l%s')">%s</a>""" \
-                    % (id_number, dir.decode('utf-8'))
+                    % (id_number, dir.decode('utf-8').replace('_',' '))
         content += u"""</li>\n"""
         content += dir_content(os.path.join(root, dir), level + 1)
     if level > 0:
         for file in files:
             content += space + u"""<li>"""
             content += u"""<a href="%s">%s</a> <em>(%s)</em>""" \
-                        % (urllib.quote(root+'/'+file), file.decode('utf-8'),
+                        % (urllib.quote(root+'/'+file),
+                           file.decode('utf-8').replace('_',' '),
                            human_size(my_getsize(os.path.join(root, file))) )
             content += u"""</li>\n"""
     content += space + u"""</ul></div>\n"""