From f236abdca916675805b8c8e9f596de330eaa9d61 Mon Sep 17 00:00:00 2001 From: Samuel Elliott Date: Mon, 5 Mar 2018 16:19:09 +0000 Subject: [PATCH] Escape SCSS import path --- core/src/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main.js b/core/src/main.js index 96c42507..cca1689c 100644 --- a/core/src/main.js +++ b/core/src/main.js @@ -75,7 +75,7 @@ class Comms { BDIpc.on('bd-compileSass', o => { if (!o.args.path && !o.args.data) return o.reply(''); if (typeof o.args.path === 'string' && typeof o.args.data === 'string') { - o.args.data = `${o.args.data} @import '${o.args.path}';`; + o.args.data = `${o.args.data} @import '${o.args.path.replace(/\\/g, '\\\\').replace(/'/g, '\\\'')}';`; o.args.path = undefined; }