{ "id": "133575", "key": "TIMOB-17369", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-09-03T17:47:52.000+0000", "created": "2014-07-22T21:27:34.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "ft" ], "versions": [], "issuelinks": [], "assignee": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "updated": "2014-10-03T21:02:07.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "13103", "name": "CLI", "description": "Node-based command line interface" } ], "description": "Using double quotes in the description field of your tiapp.xml causes errors at build-time, perhaps we could warn users not to use that character before they build the project, or escape the string if possible. See error below:\r\n\r\n{code}\r\n[ERROR] Failed to compile Java source files:\r\n[ERROR] \r\n[ERROR] /Users/jrhinehart/Documents/Appcelerator_Studio_Workspace/8dupe_test WW/build/android/gen/com/appc/dupetestnew/_8dupe_testWwAppInfo.java:48: ';' expected\r\n[ERROR] \treturn \"Test for 'Duplicate app icons on install\" bug - Verified for 52.09 of MATT utility\";\r\n[ERROR] \t ^\r\n{code}", "attachment": [], "flagged": false, "summary": "CLI: Auto-escape quotes in tiapp.xml", "creator": { "name": "jrhinehart", "key": "jrhinehart", "displayName": "Joshua Rhinehart", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jrhinehart", "key": "jrhinehart", "displayName": "Joshua Rhinehart", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "315365", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I assume this also happens if you build from the CLI?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-22T22:15:05.000+0000", "updated": "2014-07-22T22:15:05.000+0000" }, { "id": "315376", "author": { "name": "jrhinehart", "key": "jrhinehart", "displayName": "Joshua Rhinehart", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yes, it occurs when building from both Studio and CLI", "updateAuthor": { "name": "jrhinehart", "key": "jrhinehart", "displayName": "Joshua Rhinehart", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-22T22:56:22.000+0000", "updated": "2014-07-22T22:56:22.000+0000" }, { "id": "320148", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Note: The issue seemed to apply to only Android. In my testing with release-versions of the SDK, iOS and MobileWeb build fine when there are quotes in the description field. So the PR below escapes quotes for only Android builds.\r\n\r\nPR: https://github.com/appcelerator/titanium_mobile/pull/5986\r\n\r\nh4. sample app code\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: 'white'\r\n});\r\nvar lbl = Ti.UI.createLabel({\r\n text: Ti.App.description,\r\n wordWrap: true,\r\n top: 20, left: 10, right: 10\r\n});\r\nwin.add(lbl);\r\nwin.open();\r\n{code}\r\n\r\nFunctional test:\r\n\r\n1. Create a new Titanium project and replace its app.js with the code above.\r\n2. Edit the tiapp.xml to set the description to {{description with \"double quotes\" and 'single quotes' inside, even an ' unmatched apostrophe}}\r\n3. Build for Android with {{ti build -p android}}. The app should build & run without errors and display a single label, which contains the contents of the description with quotes shown properly (unescaped)\r\n4. Build for iOS and/or MobileWeb, which should likewise show the label with the string properly formatted.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-08-25T17:57:14.000+0000", "updated": "2014-08-25T17:57:14.000+0000" }, { "id": "320584", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "PR updated per comment on the pull.\r\n\r\nFor the test app, there's no need to test the single quotes as I described. But it doesn't hurt to test as shown. Code should work either way.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-08-27T16:03:52.000+0000", "updated": "2014-08-27T16:03:52.000+0000" }, { "id": "326933", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix.\r\nTested with double quotes, single quotes & apostrophe & didn't get any errors.\r\n\r\nClosing.\r\n\r\n Environment:\r\nAppc Studio : 3.4.0.201409261245\r\nTi SDK : 3.5.0.v20141002192515\r\nMac OSX : 10.9.4\r\nAlloy : 1.5.1\r\nCLI - 3.4.0\r\nCode Processor: 1.1.1\r\nNexus5 - Android 4.4.4", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-03T21:01:28.000+0000", "updated": "2014-10-03T21:01:37.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }