mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-20 23:56:20 +08:00
fix issue with app_name containing apostrophes
This commit is contained in:
parent
82582e5a5b
commit
2cefb42559
2
bin/templates/cordova/lib/prepare.js
vendored
2
bin/templates/cordova/lib/prepare.js
vendored
@ -120,7 +120,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 to "' + name + '"');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user