We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10a3558 commit 9853926Copy full SHA for 9853926
parse-css.js
@@ -780,13 +780,12 @@ function escapeString(string) {
780
// Escapes the contents (between the quotes) of a string
781
return Array.from(String(string), e=>{
782
const code = e.codePointAt(0);
783
- if(between(code, 0x0, 0x1f)
784
- || code == 0x7f
785
- || code == 0x22
786
- || code == 0x5c
787
- ) {
+ if(between(code, 0x0, 0x1f) || code === 0x7f) {
788
return "\\" + code.toString(16) + " ";
789
}
+ if(code === 0x22 || code === 0x5c) {
+ return "\\" + String.fromCodePoint(code);
+ }
790
return e;
791
}).join("");
792
0 commit comments