X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=blobdiff_plain;f=src%2Fhtls.c;h=f51da938daf87cc87b598382e45cc26aae495e01;hp=060d1bf5a3b65a5086b34df0e10a0c33a46c7512;hb=9e70ef793ddcf51edc0f6489eb6f70762380afc0;hpb=3095582d21be4087f774f5a68a2a9abfa37dd1ff diff --git a/src/htls.c b/src/htls.c index 060d1bf..f51da93 100644 --- a/src/htls.c +++ b/src/htls.c @@ -73,7 +73,7 @@ static int dcmp(const void *ap, const void *bp) static void head(char *name, struct charbuf *dst) { - char *title, *tmp; + char *title; title = sstrdup(htmlquote(name)); bprintf(dst, "\n"); @@ -82,15 +82,16 @@ static void head(char *name, struct charbuf *dst) bprintf(dst, "\n"); bprintf(dst, "Index of %s\n", title); if(stylesheet) { - bprintf(dst, "\n", htmlquote(tmp)); + bprintf(dst, "\n", htmlquote(stylesheet)); } else { - bprintf(dst, "\n"); } @@ -149,8 +150,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))