You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 28, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 28, 2026. It is now read-only.
Escape Characters in CSS content not processed correctly #459
@michael-ciniawsky I had tried using css-loader 0.25.0 with webpack 1 and that used to work fine. I was upgrading to webpack 2 and while using the latest version of css-loader with that, i came across this issue.
I see this issue #87 which was raised here. But in that case it was removing the escape characters, but in my case its adding extra escape characters 😄
kk, as a 'workaround' would it be possible to reference bootstrap as static asset in meantime and exclude it from the bundle ? Also could you test another decl if it happens there also and a maybe pattern comes up when and where 😛 ?
@rjnair-nm added tests #493, seems for one escaped characters all works fine, maybe problems in some postcss plugin? Can you create minimal reproduce repo?
This is most likely highly tailored to my specific situation but you should get the jist. Just use a simple custom loader to run some cleanup on the css-loader output for now.
@zaneadix I used your way to customize one loader for my issue, which is about a special character in css content (e.g. ü inside of content: 'something über'), and it works fine. Thank you so much!
Activity
michael-ciniawsky commentedon Mar 17, 2017
@rjnair-nm for getting started did an earlier version of
css-loaderprocess it correctly? 😛rjnair-nm commentedon Mar 17, 2017
@michael-ciniawsky I had tried using css-loader 0.25.0 with webpack 1 and that used to work fine. I was upgrading to webpack 2 and while using the latest version of css-loader with that, i came across this issue.
michael-ciniawsky commentedon Mar 17, 2017
@rjnair-nm While copy and paste, maybe typo while you opened the issue maybe the root cause 😆
michael-ciniawsky commentedon Mar 17, 2017
The delimiters don't match
michael-ciniawsky commentedon Mar 17, 2017
Otherwise I need webpack 1 && webpack 2 configs + ideally a small test repo for each to debug 😛
rjnair-nm commentedon Mar 17, 2017
@michael-ciniawsky I am using a custom library like Bootsrap which has the class definition as below :-
When the webpack processes this via css-loader, it transforms to : -
Webpack rule for css :-
I see this issue #87 which was raised here. But in that case it was removing the escape characters, but in my case its adding extra escape characters 😄
michael-ciniawsky commentedon Mar 18, 2017
kk, as a 'workaround' would it be possible to reference bootstrap as static asset in meantime and exclude it from the bundle ? Also could you test another decl if it happens there also and a maybe pattern comes up when and where 😛 ?
alexander-akait commentedon Apr 17, 2017
@rjnair-nm added tests #493, seems for one escaped characters all works fine, maybe problems in some
postcssplugin? Can you create minimal reproduce repo?zaneadix commentedon Jul 27, 2017
I'm having this same issue without postcss. I'm running sass-loader right into css-loader and getting similar output.
.oui-icon-star.oui-icon-filled:before { content: '\e20c'; }outputs as
.oui-icon-star.oui-icon-filled:before { content: "'\\e20c'"; }zaneadix commentedon Jul 28, 2017
For anyone still having this issue I've created a temporary fix locally using a custom loader.
custom loader
This is most likely highly tailored to my specific situation but you should get the jist. Just use a simple custom loader to run some cleanup on the css-loader output for now.
alexander-akait commentedon Feb 15, 2018
Close in favor #578
Removed all logic around viewport width. Discovered that previous sty…
Yaowenjie commentedon May 29, 2018
@zaneadix I used your way to customize one loader for my issue, which is about a special character in css content (e.g. ü inside of
content: 'something über'), and it works fine. Thank you so much!