diff --git a/src/config/Config.coffee b/src/config/Config.coffee index 6ef30b26e..b18724ad3 100644 --- a/src/config/Config.coffee +++ b/src/config/Config.coffee @@ -821,7 +821,7 @@ Config = favicon: 'ferongr' - usercss: `<%= multiline(read('user.css')) %>` + usercss: `<%= JSON.stringify(read('user.css')) %>` hotkeys: # QR & Options diff --git a/src/meta/jshint.json b/src/meta/jshint.json index 46db38fc0..9c2d3e820 100644 --- a/src/meta/jshint.json +++ b/src/meta/jshint.json @@ -5,6 +5,7 @@ "expr": true, "sub": true, "scripturl": true, + "multistr": true, "browser": true, "devel": true, "nonstandard": true, diff --git a/tools/template.js b/tools/template.js index 4c62011a7..cda83b983 100644 --- a/tools/template.js +++ b/tools/template.js @@ -21,7 +21,7 @@ tools.readHTML = function(filename) { }; tools.multiline = function(text) { - return text.replace(/\n+/g, '\n').split(/^/m).map(JSON.stringify).join(' +\n').replace(/`/g, '\\`'); + return text.replace(/\n+/g, '\n').split(/^/m).map(JSON.stringify).join('+').replace(/"\+"/g, '\\\n'); }; // Convert JSON object to Coffeescript expression (via embedded JS).