mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-27 00:40:15 +03:00
[project @ 2006-03-27 01:04:56 by jmb]
Reinstate checks for embedded content being the same as its parent (fixes 1456335) svn path=/import/netsurf/; revision=2196
This commit is contained in:
parent
5ca28e5ef3
commit
3f979633b8
@ -187,6 +187,7 @@ bool xml_to_box(xmlNode *n, struct content *c)
|
||||
if (!convert_xml_to_box(n, c, c->data.html.style, &root,
|
||||
&inline_container, 0, 0, 0))
|
||||
return false;
|
||||
|
||||
if (!box_normalise_block(&root, c))
|
||||
return false;
|
||||
|
||||
@ -1304,6 +1305,10 @@ bool box_object(BOX_SPECIAL_PARAMS)
|
||||
/* objects without data are ignored */
|
||||
return true;
|
||||
|
||||
/* Don't include ourself */
|
||||
if (strcmp(content->data.html.base_url, params->data) == 0)
|
||||
return true;
|
||||
|
||||
/* codetype and type are MIME types */
|
||||
if (!box_get_attribute(n, "codetype", params, ¶ms->codetype))
|
||||
return false;
|
||||
@ -1705,6 +1710,12 @@ bool box_iframe(BOX_SPECIAL_PARAMS)
|
||||
if (!url)
|
||||
return true;
|
||||
|
||||
/* Don't include ourself */
|
||||
if (strcmp(content->data.html.base_url, url) == 0) {
|
||||
free(url);
|
||||
return true;
|
||||
}
|
||||
|
||||
/* start fetch */
|
||||
ok = html_fetch_object(content, url, box, 0,
|
||||
content->available_width, 0, false, 0);
|
||||
@ -2326,6 +2337,10 @@ bool box_embed(BOX_SPECIAL_PARAMS)
|
||||
if (!params->data)
|
||||
return true;
|
||||
|
||||
/* Don't include ourself */
|
||||
if (strcmp(content->data.html.base_url, params->data) == 0)
|
||||
return true;
|
||||
|
||||
/* add attributes as parameters to linked list */
|
||||
for (a = n->properties; a; a = a->next) {
|
||||
if (strcasecmp((const char *) a->name, "src") == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user