From a32bf68c85a97b3db9fe61e79c1120e21c5d5899 Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Mon, 8 Apr 2013 21:48:49 +0900 Subject: Support the siteconf feature Patch to support the siteconf feature, from [w3m-dev 04463] on 2012-06-27, provided by AIDA Shinra. --- map.c | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) (limited to 'map.c') diff --git a/map.c b/map.c index 90aa35a..12701e7 100644 --- a/map.c +++ b/map.c @@ -279,7 +279,7 @@ follow_map_panel(Buffer *buf, char *name) p = parsedURL2Str(&pu)->ptr; q = html_quote(p); if (DecodeURL) - p = html_quote(url_unquote_conv(p, buf->document_charset)); + p = html_quote(url_decode2(p, buf)); else p = q; Strcat_m_charp(mappage, "", @@ -417,10 +417,7 @@ append_map_info(Buffer *buf, Str tmp, FormItemList *fi) continue; parseURL2(a->url, &pu, baseURL(buf)); q = html_quote(parsedURL2Str(&pu)->ptr); - if (DecodeURL) - p = html_quote(url_unquote_conv(a->url, buf->document_charset)); - else - p = html_quote(a->url); + p = html_quote(url_decode2(a->url, buf)); Strcat_m_charp(tmp, "  ", html_quote(*a->alt ? a->alt : mybasename(a->url)), @@ -457,10 +454,8 @@ append_link_info(Buffer *buf, Str html, LinkList * link) Strcat_charp(html, "[Rev]"); if (!l->url) url = "(empty)"; - else if (DecodeURL) - url = html_quote(url_unquote_conv(l->url, buf->document_charset)); else - url = html_quote(l->url); + url = html_quote(url_decode2(l->url, buf)); Strcat_m_charp(html, "", url, NULL); if (l->ctype) Strcat_m_charp(html, " (", html_quote(l->ctype), ")", NULL); @@ -498,8 +493,7 @@ append_frame_info(Buffer *buf, Str html, struct frameset *set, int level) Strcat_charp(html, p); } if (DecodeURL) - p = html_quote(url_unquote_conv(frame.body->url, - buf->document_charset)); + p = html_quote(url_decode2(frame.body->url, buf)); else p = q; Strcat_m_charp(html, " ", p, "
\n", NULL); @@ -550,9 +544,7 @@ page_info_panel(Buffer *buf) #ifdef USE_M17N Strcat_charp(tmp, "
"); #endif - p = parsedURL2Str(&buf->currentURL)->ptr; - if (DecodeURL) - p = url_unquote_conv(p, 0); + p = url_decode2(parsedURL2Str(&buf->currentURL)->ptr, NULL); Strcat_m_charp(tmp, "", "
Title", html_quote(buf->buffername), @@ -589,7 +581,7 @@ page_info_panel(Buffer *buf) p = parsedURL2Str(&pu)->ptr; q = html_quote(p); if (DecodeURL) - p = html_quote(url_unquote_conv(p, buf->document_charset)); + p = html_quote(url_decode2(p, buf)); else p = q; Strcat_m_charp(tmp, @@ -602,7 +594,7 @@ page_info_panel(Buffer *buf) p = parsedURL2Str(&pu)->ptr; q = html_quote(p); if (DecodeURL) - p = html_quote(url_unquote_conv(p, buf->document_charset)); + p = html_quote(url_decode2(p, buf)); else p = q; Strcat_m_charp(tmp, @@ -613,10 +605,7 @@ page_info_panel(Buffer *buf) if (a != NULL) { FormItemList *fi = (FormItemList *)a->url; p = form2str(fi); - if (DecodeURL) - p = html_quote(url_unquote_conv(p, buf->document_charset)); - else - p = html_quote(p); + p = html_quote(url_decode2(p, buf)); Strcat_m_charp(tmp, "
Method/type of current form ", p, NULL); -- cgit v1.2.3