New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 738702 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jul 17
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

HTML elements within SVG <title>/<desc> cause the HTML parser to stop handling CDATA sections correctly

Reported by amelia.b...@gmail.com, Jul 1 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36

Example URL:
https://codepen.io/AmeliaBR/pen/RgMZJN/

Steps to reproduce the problem:
1. Create an inline SVG within a non-XML HTML file.

2. Use HTML markup inside a <title> or <desc> in that SVG (this is valid, and is still parsed fine).

3. Add a <script> or <style> section later in the SVG, using <![CDATA[...]]> around the content (which is valid within SVG in HTML, and is parsed fine in other cases).

What is the expected behavior?
The HTML parser should accept the CDATA notation within inline SVG, dropping it from the text passed to the CSS parser / JS interpreter.

See https://html.spec.whatwg.org/multipage/syntax.html#cdata-sections

What went wrong?
The CDATA bits are treated as plain text, and cause the CSS/JS to break.  But only if there had been previous HTML-in-SVG-metadata in the document.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? N/A 

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 59.0.3071.115  Channel: stable
OS Version: 10.0
Flash Version: 

PS. HTML elements in an SVG <foreignObject> don't seem to cause the same problem.
 

Comment 1 by kochi@chromium.org, Jul 3 2017

Components: -Blink Blink>HTML>Parser Blink>SVG

Comment 2 by f...@opera.com, Jul 3 2017

This is suspiciously similar to  issue 722376 , so not unlikely to be a dupe.
That definitely looks like a different symptom of the same parser problem.  I was searching specifically for CDATA, so didn't see that.
Cc: hdodda@chromium.org
Labels: Needs-Feedback
Tested the issue on windows 10 & 7 , amc os 10.12.5 using chrome m59 #59.0.3071.115 and M61 #61.0.3150 and issue is seen .

Attached screencast for reference.

@amelia.bellamy.royds-- Could you please check attached screencast and confirm us if this is the issue and also confirm us the expected result , as the video consists of fireofx behavior too.

Thanks!
738702.mp4
810 KB View Download

Comment 5 by f...@opera.com, Jul 6 2017

Status: Available (was: Unconfirmed)
Meh, I forgot to confirm this before...

Comment 6 by f...@opera.com, Jul 6 2017

Labels: OS-Android OS-Chrome OS-Fuchsia OS-Linux OS-Mac

Comment 7 by f...@opera.com, Jul 6 2017

Labels: -Needs-Feedback
Yes, thank you. That (#4) matches what I'm getting.
Labels: PaintTeamTriaged-20170706 BugSource-User

Comment 10 by w...@chromium.org, Jul 15 2017

Labels: -OS-Fuchsia
Project Member

Comment 11 by sheriffbot@chromium.org, Jul 16

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: tkent@chromium.org
Status: WontFix (was: Untriaged)
Looks https://codepen.io/AmeliaBR/pen/RgMZJN/ works well with Chrome 67.

Sign in to add a comment