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 02acb83 commit 0a4982fCopy full SHA for 0a4982f
src/sass.util.js
@@ -29,9 +29,9 @@ function pointerToString(pointer) {
29
function stringToPointer(text) {
30
// a character like ” takes 3 bytes, while .length would return 1
31
// see https://github.com/medialize/sass.js/issues/72#issuecomment-263916386
32
- var bytes = unescape(encodeURIComponent(text)).length;
+ var bytes = Module.lengthBytesUTF8(text);
33
var buffer = Module._malloc(bytes + 1);
34
- Module.writeStringToMemory(text, buffer);
+ Module.stringToUTF8(text, buffer, bytes + 1);
35
return buffer;
36
}
37
0 commit comments