1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-27 01:25:34 +00:00

[iframe] Try to load iframes. Now they are not displayed, but dowloaded.

This commit is contained in:
Witold Filipczyk 2021-07-20 15:07:25 +02:00
parent c21e351525
commit ec44f8a6fb
3 changed files with 7 additions and 10 deletions

View File

@ -467,7 +467,7 @@ static void
html_iframe_do(char *a, char *object_src,
struct html_context *html_context)
{
char *name, *url = NULL;
char *name, *url2, *url = NULL;
struct uri *uri;
url = null_or_stracpy(object_src);
@ -492,17 +492,15 @@ html_iframe_do(char *a, char *object_src,
html_context->options->framename, html_context);
}
#if 0
char *url2 = join_urls(html_context->base_href, url);
url2 = join_urls(html_context->base_href, url);
uri = url2 ? get_uri(url2, URI_BASE) : NULL;
uri = get_uri(url2, URI_BASE);
if (uri) {
/* Request the imported script as part of the document ... */
html_context->special_f(html_context, SP_IFRAME, name, uri);
html_context->special_f(html_context, SP_IFRAME, uri);
done_uri(uri);
mem_free(url2);
}
#endif
mem_free_if(url2);
mem_free(name);
mem_free(url);
}

View File

@ -2359,7 +2359,6 @@ html_special(struct html_context *html_context, enum html_special_type c, ...)
case SP_IFRAME:
{
if (document) {
char *name = va_arg(l, char *);
struct uri *uri = va_arg(l, struct uri *);
add_to_uri_list(&document->iframes, uri);

View File

@ -487,7 +487,7 @@ load_iframes(struct session *ses, struct document_view *doc_view)
if (!document) return;
foreach_uri (uri, index, &document->iframes) {
open_uri_in_new_tab(ses, uri, 0, 0);
request_additional_file(ses, "", uri, PRI_CSS);
}
}