Closed gpoitch closed 7 years ago
Looks like this retains the input css's quoting, so this works ok:
.style {
background-image: url("./image.svg");
}
But this fails:
.style {
background-image: url(./image.svg);
}
Quotes on file path urls are optional according to the css spec, but maybe this module should enforce adding quotes when inlining.
@gdub22 thanks for feedback. Yes, you're right. I will try fix it soon.
replace https://github.com/postcss/postcss-url/blob/master/src/type/inline.js#L81 on
return `'${(options.includeUriFragment && asset.hash) ? encodedStr + asset.hash : encodedStr}'`;
work for me.
Thank you. Confirmed it's working.
Thanks for the optimizeSvgEncode feature.
It appears to be creating invalid css:
Module build failed: Unclosed string
Look like it's because Inlining inserts without wrapping the whole thing in quotes and there are now unencoded quotes in the svg when using optimizeSvgEncode