The data:image/png;base64, is being removed.


I am using the WebGrease package directly in some custom code
// Setting for the minifier
CssSettings settings = new CssSettings
    CommentMode = CssComment.None,
    TermSemicolons = false,
// Minify the text.
cssText = new Minifier().MinifyStyleSheet( cssText, settings );
We found that the CSS minifier does not process the base64 embedded image data elements correctly if there is a space (or more than one space) following the comma after the ;base64, element.

.test { background-image: url( data:image/png;base64, iVBORw0KGgoAAAANSUhEU6G1eRcsVuD2kXAAAAAElFTkSuQmCC ); }

will return


The data: elements have been removed. Note: The encoded values has been truncated to keep the example readable.

If you remove the space following the comma then it works correctly.



hunterb46 wrote Feb 2, 2016 at 1:35 PM

I'm having a similar issue with embedded blocks,


is changed to