You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Julien Durens (JIRA)" <ji...@apache.org> on 2015/04/10 11:01:13 UTC

[jira] [Comment Edited] (CB-8250) special characters in config.xml

    [ https://issues.apache.org/jira/browse/CB-8250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14489205#comment-14489205 ] 

Julien Durens edited comment on CB-8250 at 4/10/15 9:01 AM:
------------------------------------------------------------

OK, I think I got it, 
https://github.com/apache/cordova-lib/blob/master/cordova-lib/src/cordova/metadata/android_parser.js
replacing line 203 :
var name = config.name();
by : 
var name = config.name().replace(/\\/g, "\\\\")
   .replace(/\$/g, "\\’")
   .replace(/'/g, "\\'")
   .replace(/"/g, "\\\"");
should do the trick...
But I fucking don't understand the contribute policy of Apache...


was (Author: n00dl3):
OK, I think I got it, 
https://github.com/apache/cordova-lib/blob/master/cordova-lib/src/cordova/metadata/android_parser.js
replacing line 203 :
var name = config.name();
by : 
var name = config.name().replace(/\\/g, "\\\\")
   .replace(/\$/g, "\\’")
   .replace(/'/g, "\\'")
   .replace(/"/g, "\\\"");
should do the trick...
But I fucking don't understand the contribute policy of Apache...

> special characters in config.xml
> --------------------------------
>
>                 Key: CB-8250
>                 URL: https://issues.apache.org/jira/browse/CB-8250
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI
>    Affects Versions: 3.5.0, 4.1.3
>         Environment: Mac OSX Android iOS
>            Reporter: Julien Durens
>
> In the config.xml, when you have an app name containing a special character (in my case a single quote, or an apostropher) it has to be escaped to work on android, but it shouldn't on iOS. So I had to change the name of the app according to the platform I was trying to build:
> <name>My app isn\'t that bad</name> on android
> and
> <name>My app isn't that bad</name> on ios
> this kind of job shoud be done by the cordova platform add command



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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