This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 18741 - Somewhere the anti-looping behaviour should be specified since this works interoperably across browsers and seems to be a compat requirement for the web. It seems that if the iframe src resolves to a url of an ancestor browsing context, excluding the frag
Summary: Somewhere the anti-looping behaviour should be specified since this works int...
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-30 09:33 UTC by contributor
Modified: 2012-12-01 21:56 UTC (History)
3 users (show)

See Also:


Attachments

Description contributor 2012-08-30 09:33:26 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/
Multipage: http://www.whatwg.org/C#process-the-iframe-attributes
Complete: http://www.whatwg.org/c#process-the-iframe-attributes

Comment:
Somewhere the anti-looping behaviour should be specified since this works
interoperably across browsers and seems to be a compat requirement for the
web. It seems that if the iframe src resolves to a url of an ancestor browsing
context, excluding the fragment component, then nothing should load in the
iframe.

Posted from: 2001:4c28:a030:30:1d3c:929e:c265:c87b
User agent: Opera/9.80 (X11; Linux x86_64; U; Edition Next; en) Presto/2.11.310 Version/12.50
Comment 1 James Graham 2012-08-30 13:19:14 UTC
OK, not quite perfect interoperability, but [1] seems to be close to the desired behaviour

[1] http://hoppipolla.co.uk/tests/iframe/nested_iframes.html
Comment 2 Ian 'Hixie' Hickson 2012-09-19 19:57:54 UTC
This doesn't seem accurate, I've definitely seen cases of deeper loops when hacking <iframe>s in the live DOM viewer.
Comment 3 Ian 'Hixie' Hickson 2012-12-01 21:54:43 UTC
I don't follow what's going on in [1].

However, in my own testing I agree that Opera and Firefox do what you describe. WebKit seems to allow one extra iteration. I can't run IE on this machine.
Comment 4 contributor 2012-12-01 21:56:35 UTC
Checked in as WHATWG revision r7555.
Check-in comment: Browsers won't let you nest iframes that point to ancestors.
http://html5.org/tools/web-apps-tracker?from=7554&to=7555