Merge branch 'fix-appname-apostrophe' of https://github.com/revolunet/cordova-android

Using a merge commit to merge in a PR
This closes #272
This commit is contained in:
Joe Bowser 2016-10-11 15:49:20 -07:00
commit be19585c68

View File

@ -169,7 +169,7 @@ function updateProjectAccordingTo(platformConfig, locations) {
// Update app name by editing res/values/strings.xml
var name = platformConfig.name();
var strings = xmlHelpers.parseElementtreeSync(locations.strings);
strings.find('string[@name="app_name"]').text = name;
strings.find('string[@name="app_name"]').text = name.replace(/\'/g, '\\\'');
fs.writeFileSync(locations.strings, strings.write({indent: 4}), 'utf-8');
events.emit('verbose', 'Wrote out android application name "' + name + '" to ' + locations.strings);