Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inlined SVG with Stencil in Chrom causes errors #183

Closed
rsmogura opened this issue Jan 27, 2020 · 1 comment
Closed

Inlined SVG with Stencil in Chrom causes errors #183

rsmogura opened this issue Jan 27, 2020 · 1 comment

Comments

@rsmogura
Copy link

  • Rollup Plugin Name: image
  • Rollup Plugin Version: 2.0.1
  • Rollup Version: ?
  • Operating System (or Browser): Chrome
  • Node Version: 12.13.1

How Do We Reproduce?

Use instructions provided in Plugin README.MD. Inline SVG using import statements, and pass in TSX as image src (code samples below)

Expected Behavior

SVG displayed in browser

Actual Behavior

SVG not displayed in browser. Data URI generates error in Chrome only. Not visible in Edge, nor Safari.

Error doesn't appear if Data URI is encoded with Base 64 (see #136)

Problematic SVG Data URI:

data:image/svg+xml;utf-8,<?xml version="1.0" encoding="UTF-8"?><svg width="46px" height="43px" viewBox="0 0 46 43" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">    <!-- Generator: Sketch 62 (91390) - https://sketch.com -->    <title>Slice 1</title>    <desc>Created with Sketch.</desc>    <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">        <polyline id="Path" stroke="#979797" points="0.6875 0.78515625 28.890625 40.9804688 44.796875 0.78515625"></polyline>    </g></svg>

Error:

This page contains the following errors:
error on line 1 at column 426: AttValue: ' expected
Below is a rendering of the page up to the first error.
@shellscape
Copy link
Collaborator

Thanks for reporting the issue. This is being tracked in #173.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants