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

Issue 621687 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Can't open data:svg url in a new tab

Reported by teo8...@gmail.com, Jun 20 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36

Example URL:
http://jsfiddle.net/estelle/sjjjb/

Steps to reproduce the problem:
1. open http://jsfiddle.net/estelle/sjjjb/
2. Right-click on the red-white gradient stripes in the output of the jsfiddle, and do "Inspect Element"
3. Select the "body" element inside the jsfiddle output frame
4. In the style panel, look for the property

  background-image: url("data:image/svg+xml,.....")

5. Right-click on the data: url and do Open Link in new tab
6. In the new tab, do View Page source

What is the expected behavior?
Step 5: the svg image should open in a new tab
Step 6: you should see the svg source, identical to the one you see as the data: url in the Style panel

What went wrong?
Step 5: an XML parsing error shows up (see screenshot 2): 
  Att. value " or ' is expected
(which is exactly what is there)

Step 6: the source code is truncated after xmlns=

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? N/A 

Chrome version: 51.0.2704.103  Channel: stable
OS Version: 
Flash Version: Shockwave Flash 22.0 r0

In this case, the svg image used as background via a data: url is rendered correctly in the page, and the issue is only in opening it in a new tab.
If, however, you have any actual error in the svg preventing it from being rendered as background, this bug makes it impossible to debug it, which is what the DevTools are supposed to be for.
 

Comment 1 by teo8...@gmail.com, Jun 20 2016

Untitled.png
105 KB View Download
Screenshot from 2016-06-21 00-34-36.png
24.5 KB View Download

Comment 2 by f...@opera.com, Jun 22 2016

Components: -Blink Platform>DevTools
Status: Untriaged (was: Unconfirmed)
Cc: chenwilliam@google.com
Components: Platform>DevTools>HTML
Status: Assigned (was: Untriaged)
Interesting. We botch setting up the link. I suppose we need to URIEncode it?

Will, wanna take a look at this along with the other bug?

Screen Shot 2016-07-01 at 4.44.26 PM.png
146 KB View Download
Labels: Hotlist-Polish
Owner: phulce@chromium.org
Status: Fixed (was: Assigned)
This appears to be fixed in 54 and later, the full data URI is opened in the new tab and the svg renders correctly. The separate point about debuggability of a broken svg can be worked around by using the svg in the body of another page instead of iterating on the data URI directly.
Labels: -Hotlist-Polish

Sign in to add a comment