From: Fredrik Tolf Date: Mon, 30 Aug 2010 15:30:59 +0000 (+0200) Subject: htls: Remember to quote URL characters in filenames. X-Git-Tag: 0.1~56 X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=commitdiff_plain;h=9f1a1144068445207fddd94a393878c47faba68a htls: Remember to quote URL characters in filenames. --- 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))