From 9f1a1144068445207fddd94a393878c47faba68a Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Mon, 30 Aug 2010 17:30:59 +0200 Subject: [PATCH] htls: Remember to quote URL characters in filenames. --- src/htls.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/htls.c b/src/htls.c index 907187c..d2db5f4 100644 --- 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, "%s", fn, fn); + bprintf(dst, "", htmlquote(urlquote(dirbuf.b[i].name))); + bprintf(dst, "%s", htmlquote(dirbuf.b[i].name)); + bprintf(dst, ""); if(dispsize) { bprintf(dst, ""); if(!S_ISDIR(dirbuf.b[i].sb.st_mode)) -- 2.11.0