From c9de913861aa7533e4409cd01783381b76699264 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Tue, 9 Apr 2019 18:15:58 +0800 Subject: [PATCH] Fixed the bug some characters is not be escaped when packaging language files --- gulpfile.js | 1 + 1 file changed, 1 insertion(+) diff --git a/gulpfile.js b/gulpfile.js index 8493774..23b6c12 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -135,6 +135,7 @@ gulp.task('process-assets-bundle', ['prepare-fonts', 'prepare-langs', 'prepare-h var lastPointIndex = fileName.lastIndexOf('.'); var languageName = fileName.substr(0, lastPointIndex); + content = content.replace(/\\/g, '\\\\'); content = content.replace(/\r/g, ''); content = content.replace(/\n/g, '\\n'); content = content.replace(/"/g, '\\"');