Skip to content

SVG loader and and of lines #4145

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

Open
ecochard opened this issue Apr 15, 2025 · 1 comment
Open

SVG loader and and of lines #4145

ecochard opened this issue Apr 15, 2025 · 1 comment

Comments

@ecochard
Copy link

ecochard commented Apr 15, 2025

my svg contains end of lines
when I import it, it is uriencoded

import logo from "logo.svg"

the logo variable contains %0A sequences instead of \n (or nothing)

<?xml version="1.0" encoding="UTF-8"?>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="647" height="145">
</svg>

is converted to

<?xml version="1.0" encoding="UTF-8"?>%0A<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="647" height="145">%0A</svg>

is that standard ?

@evanw
Copy link
Owner

evanw commented Apr 16, 2025

That depends on how you loaded it. The text loader uses \n while the dataurl loader uses %0A. They are both the standard ways to encode the newline character in those formats.

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

No branches or pull requests

2 participants