mirror of
https://github.com/apache/cordova-android.git
synced 2026-04-23 00:00:09 +08:00
fix issue with app_name containing apostrophes
This commit is contained in:
Vendored
+1
-1
@@ -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 + '"');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user