cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject [1/2] android commit: fix issue with app_name containing apostrophes
Date Tue, 11 Oct 2016 22:50:01 GMT
Repository: cordova-android
Updated Branches:
  refs/heads/master ca0cbad1c -> be19585c6


fix issue with app_name containing apostrophes


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/2cefb425
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/2cefb425
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/2cefb425

Branch: refs/heads/master
Commit: 2cefb425598aed2b2bf0d742c93a2b8f8ce2ba6b
Parents: 82582e5
Author: Julien Bouquillon <julien@bouquillon.com>
Authored: Thu Mar 10 18:17:42 2016 +0100
Committer: Julien Bouquillon <julien@bouquillon.com>
Committed: Mon Mar 14 14:01:43 2016 +0100

----------------------------------------------------------------------
 bin/templates/cordova/lib/prepare.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/2cefb425/bin/templates/cordova/lib/prepare.js
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/lib/prepare.js b/bin/templates/cordova/lib/prepare.js
index 474ffd6..f4e5b85 100644
--- a/bin/templates/cordova/lib/prepare.js
+++ b/bin/templates/cordova/lib/prepare.js
@@ -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 + '"');
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message