diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2021-01-02 00:20:37 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2021-01-02 00:20:37 +0000 |
commit | 1d0ba25a660483da1272a31dd077ed94441e3d9f (patch) | |
tree | 1d8dee52cd1e3d340fe178a8193dc96c4496db84 /frame.c | |
parent | Merge branch 'cvstrunk' into upstream (diff) | |
download | w3m-1d0ba25a660483da1272a31dd077ed94441e3d9f.tar.gz w3m-1d0ba25a660483da1272a31dd077ed94441e3d9f.zip |
New upstream version 0.5.3+git20210102upstream/0.5.3+git20210102upstream
Diffstat (limited to '')
-rw-r--r-- | frame.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -91,7 +91,8 @@ newFrame(struct parsed_tag *tag, Buffer *buf) body->baseURL = baseURL(buf); if (tag) { if (parsedtag_get_value(tag, ATTR_SRC, &p)) - body->url = url_quote_conv(remove_space(p), buf->document_charset); + body->url = url_encode(remove_space(p), body->baseURL, + buf->document_charset); if (parsedtag_get_value(tag, ATTR_NAME, &p) && *p != '_') body->name = url_quote_conv(p, buf->document_charset); } @@ -639,7 +640,7 @@ createFrameFile(struct frameset *f, FILE * f1, Buffer *current, int level, case HTML_BASE: /* "BASE" is prohibit tag */ if (parsedtag_get_value(tag, ATTR_HREF, &q)) { - q = url_quote_conv(remove_space(q), charset); + q = url_encode(remove_space(q), NULL, charset); parseURL(q, &base, NULL); } if (parsedtag_get_value(tag, ATTR_TARGET, &q)) { @@ -768,8 +769,8 @@ createFrameFile(struct frameset *f, FILE * f1, Buffer *current, int level, if (!tag->value[j]) break; tag->value[j] = - url_quote_conv(remove_space(tag->value[j]), - charset); + url_encode(remove_space(tag->value[j]), + &base, charset); tag->need_reconstruct = TRUE; parseURL2(tag->value[j], &url, &base); if (url.scheme == SCM_UNKNOWN || @@ -894,8 +895,10 @@ renderFrame(Buffer *Cbuf, int force_reload) /* * if (Cbuf->frameQ != NULL) fset = Cbuf->frameQ->frameset; else */ fset = Cbuf->frameset; - if (fset == NULL || createFrameFile(fset, f, Cbuf, 0, force_reload) < 0) + if (fset == NULL || createFrameFile(fset, f, Cbuf, 0, force_reload) < 0) { + fclose(f); return NULL; + } fclose(f); flag = RG_FRAME; if ((Cbuf->currentURL).is_nocache) |