Can't open data:svg url in a new tab
Reported by
teo8...@gmail.com,
Jun 20 2016
|
||||||
Issue descriptionUserAgent: 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.
,
Jun 22 2016
,
Jul 1 2016
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?
,
Dec 1 2016
,
Dec 9 2016
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.
,
Jan 5 2017
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by teo8...@gmail.com
, Jun 20 2016105 KB
105 KB View Download
24.5 KB
24.5 KB View Download