Dolda2000 GitWeb
/
ashd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d94a5f
)
htls: Remember to quote URL characters in filenames.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Mon, 30 Aug 2010 15:30:59 +0000
(17:30 +0200)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Mon, 30 Aug 2010 15:33:39 +0000
(17:33 +0200)
src/htls.c
patch
|
blob
|
blame
|
history
diff --git
a/src/htls.c
b/src/htls.c
index
907187c
..
d2db5f4
100644
(file)
--- a/
src/htls.c
+++ b/
src/htls.c
@@
-149,8
+149,9
@@
static void mkindex(char *name, DIR *dir, struct charbuf *dst)
if(dirbuf.b[i].w)
bprintf(dst, " writable");
bprintf(dst, "\">");
- fn = htmlquote(dirbuf.b[i].name);
- bprintf(dst, "<td class=\"filename\"><a href=\"%s\">%s</a></td>", fn, fn);
+ bprintf(dst, "<td class=\"filename\"><a href=\"%s\">", htmlquote(urlquote(dirbuf.b[i].name)));
+ bprintf(dst, "%s", htmlquote(dirbuf.b[i].name));
+ bprintf(dst, "</a></td>");
if(dispsize) {
bprintf(dst, "<td class=\"filesize\">");
if(!S_ISDIR(dirbuf.b[i].sb.st_mode))