commit 8b10cf63299bab9d77fb5dd539ce5cb140682d8e
parent b5dc327a6a19ae4612ac1e0470c6d324f9460ee0
Author: ukai <ukai>
Date: Fri, 8 Mar 2002 16:58:12 +0000
[w3m-dev 03095] Re: gopher broken
(Re: Bug#137287: w3m: segfault on gopher://xxxx.xxx URI)
* file.c (loadGopherDir): html_quote(url_quote_conv())
From: Fumitoshi UKAI <ukai@debian.or.jp>
Diffstat:
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,9 @@
+2002-03-09 Fumitoshi UKAI <ukai@debian.or.jp>
+
+ * [w3m-dev 03095] Re: gopher broken
+ (Re: Bug#137287: w3m: segfault on gopher://xxxx.xxx URI)
+ * file.c (loadGopherDir): html_quote(url_quote_conv())
+
2002-03-09 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 03092] Reload image
diff --git a/file.c b/file.c
@@ -6204,7 +6204,7 @@ Buffer *
loadGopherDir(URLFile *uf, Buffer *volatile newBuf)
{
Str tmp, lbuf, name, file, host, port;
- char code;
+ char code = CODE_ASCII;
char *p, *q;
FILE *src;
URLFile f;
@@ -6280,8 +6280,9 @@ loadGopherDir(URLFile *uf, Buffer *volatile newBuf)
}
q = Strnew_m_charp("gopher://", host->ptr, ":", port->ptr,
"/", file->ptr, NULL)->ptr;
- Strcat_m_charp(tmp, "<a href=\"", url_quote(q), "\">", p,
- html_quote(name->ptr + 1), "</a>\n", NULL);
+ Strcat_m_charp(tmp, "<a href=\"",
+ html_quote(url_quote_conv(q, code)),
+ "\">", p, html_quote(name->ptr + 1), "</a>\n", NULL);
}
gopher_end: