forked from github/cordova-android
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:
commit
be19585c68
2
bin/templates/cordova/lib/prepare.js
vendored
2
bin/templates/cordova/lib/prepare.js
vendored
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user