Fixed the bug some characters is not be escaped when packaging language files

This commit is contained in:
MaysWind 2019-04-09 18:15:58 +08:00
parent ed10b1982d
commit c9de913861

View file

@ -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, '\\"');