X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fftp-ls.c;fp=src%2Fftp-ls.c;h=d996b8adda9154096eb564050d434a6fca68e5d5;hp=dd6caa661273b1fb422d0fd6157d9a06ea5feab7;hb=ca12585a0e221e31a59898fe33f1a0caf7918f26;hpb=cf93ce7f4b428c78ca705f0f905ba75bbb2806d5 diff --git a/src/ftp-ls.c b/src/ftp-ls.c index dd6caa66..d996b8ad 100644 --- a/src/ftp-ls.c +++ b/src/ftp-ls.c @@ -850,6 +850,7 @@ ftp_index (const char *file, struct url *u, struct fileinfo *f) { FILE *fp; char *upwd; + char *htcldir; /* HTML-clean dir name */ char *htclfile; /* HTML-clean file name */ char *urlclfile; /* URL-clean file name */ @@ -879,12 +880,17 @@ ftp_index (const char *file, struct url *u, struct fileinfo *f) } else upwd = xstrdup (""); + + htcldir = html_quote_string (u->dir); + fprintf (fp, "\n"); fprintf (fp, "\n\n"); - fprintf (fp, _("Index of /%s on %s:%d"), u->dir, u->host, u->port); + fprintf (fp, _("Index of /%s on %s:%d"), htcldir, u->host, u->port); fprintf (fp, "\n\n\n

"); - fprintf (fp, _("Index of /%s on %s:%d"), u->dir, u->host, u->port); + fprintf (fp, _("Index of /%s on %s:%d"), htcldir, u->host, u->port); fprintf (fp, "

\n
\n
\n");
+
+  xfree (htcldir);
   while (f)
     {
       fprintf (fp, "  ");