New issue
Advanced search Search tips

Issue 906249 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Nov 19
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Iframe srcdoc containing end script tag confuses top level frame

Project Member Reported by odejesush@chromium.org, Nov 16

Issue description

Chrome Version: 70.0.3538.102 (Official Build) (64-bit), 71.0.3578.21 (Official Build) dev (64-bit), 70.0.3538.80, 72.0.3612.0 (Official Build) canary (64-bit) (cohort: Clang-64)
OS: ChromeOS, Linux, Android, Windows

What steps will reproduce the problem?
(1) In an HTML file, create a child iframe that loads its HTML from the srcdoc attribute.
(2) The srcdoc HTML should be inside template literals and should contain some JavaScript inside <script> tags.

What is the expected result?
The iframe should load properly and the top level frame should not be affected by it.

What happens instead?
The end script tag inside the srcdoc template literal is confused as the end script tag of the top level frame, so everything after that is treated as HTML text.

I created a jsfiddle with and example: https://jsfiddle.net/naof48ut/

The problem is fixed if the end script tag of the srcdoc template literal has its forward slash escaped.


 
Components: -Blink>HTML>IFrame Blink>HTML>Parser
Owner: tkent@chromium.org
Status: WontFix (was: Untriaged)
<script> content can't contain </script>.  It's a basic HTML syntax.

Sign in to add a comment