Skip to content

Quotes are removed in data uri during concatenation #31

@BboyKeen

Description

@BboyKeen

Hi,

I've just encontered a bug during concatenation of files containing inlined SVG

div {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='32' height='24' viewBox='0 0 32 24'><polygon points='0,0 32,0 16,24' style='fill: rgb%2851, 51, 51%29'></polygon></svg>");
}

produces

div {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns=http://www.w3.org/2000/svg version=1.1 width=32 height=24 viewBox=0 0 32 24><polygon points=0,0 32,0 16,24 style=fill: rgb%2851, 51, 51%29></polygon></svg>");
}

You'll notice that all single quotes are removed after concatenation, which results in bad SVG. Same problem appears with double quotes.
This problem disappears when I use the option rebaseUrls : false. Is this the correct behavior ?

When using base64 encoded resource, there is no problem.

I'm using gulp-concat-css 2.2.0

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions