{ "id": "115796", "key": "ALOY-702", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [ { "id": "15402", "description": "Alloy 1.2.0, concurrent with SDK 3.1.0", "name": "Alloy 1.2.0", "archived": false, "released": true, "releaseDate": "2013-08-15" }, { "id": "15489", "description": "2013 Sprint 12", "name": "2013 Sprint 12", "archived": true, "released": true, "releaseDate": "2013-06-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-06-11T20:04:24.000+0000", "created": "2013-06-11T19:25:09.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-06-21T21:28:14.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": "13603", "name": "Styling", "description": "TSS, dynamic styling, styling API" } ], "description": "alloy compiles will break under certain circumstances if there is a double quote in a string in a TSS file. For example, the following string would cause an error:\r\n\r\n{code:javascript}\r\n\"#info\": {\r\n\tcolor: '#000',\r\n\tbackgroundColor: '#eee',\r\n\tfont: {\r\n\t\tfontSize: '14dp',\r\n\t\tfontWeight: 'normal'\r\n\t},\r\n\theight: Ti.UI.SIZE,\r\n\twidth: Ti.UI.SIZE,\r\n\tbottom: 10,\r\n\tbackgroundPaddingBottom: 10,\r\n\tbackgroundPaddingTop: 10,\r\n\tbackgroundPaddingLeft: 10,\r\n\tbackgroundPaddingRight: 10,\r\n\ttext: 'On Android, the above image will display the density. Otherwise it simply displays \"default\".',\r\n\ttextAlign: 'center'\r\n}\r\n{code}\r\n\r\nthe error is:\r\n\r\n{code}\r\n[DEBUG] [INFO] [index.xml] view processing...\r\n[DEBUG] [INFO] style: \"index.tss\"\r\n[DEBUG] [INFO] view: \"index.xml\"\r\n[DEBUG] [INFO] controller: \"index.js\"\r\n[DEBUG] [WARN] : ERROR: Unexpected token keyword «default», expected punc «,» [Resources/alloy/controllers/index.js:33,318]\r\n[DEBUG] [DEBUG] /usr/local/lib/node_modules/alloy/Alloy/commands/compile/sourceMapper.js:99\r\n[DEBUG] [DEBUG] \tthrow e;\r\n[DEBUG] [DEBUG] \t ^\r\n[DEBUG] [ERROR] \r\n[DEBUG] [ERROR] (/usr/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:185:18)\r\n[DEBUG] [ERROR] (/usr/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:199:11)\r\n[DEBUG] [DEBUG] at croak (/usr/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:630:9)\r\n[DEBUG] [ERROR] (/usr/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:638:9)\r\n[DEBUG] [DEBUG] at expect_token (/usr/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:651:9)\r\n[DEBUG] [DEBUG] at expect (/usr/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:654:36)\r\n[DEBUG] [DEBUG] at /usr/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:1154:44\r\n[DEBUG] [DEBUG] at /usr/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:677:24\r\n[DEBUG] [DEBUG] at expr_atom (/usr/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:1111:35)\r\n[DEBUG] [DEBUG] at maybe_unary (/usr/local/lib/node_modules/alloy/node_modules/uglify-js/lib/parse.js:1281:19)\r\n[DEBUG] [ERROR] Alloy compiler failed\r\n{code}", "attachment": [], "flagged": false, "summary": "Double quotes not properly escaped in TSS strings", "creator": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "257229", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/alloy/pull/153\r\n\r\nFunctional testing can be passed simply by having the automated test suite pass for all tests, as this is a compile time bug:\r\n\r\n{code}jake test:all{code}\r\n\r\nMore specifically, you can compile the advanced/android_density app which makes use of double quotes in strings in the TSS files:\r\n\r\n{code}jake test:spec[compile.js] app=advanced/android_density{code}", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-11T20:04:24.000+0000", "updated": "2013-06-11T20:08:00.000+0000" }, { "id": "259053", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified as fixed.\r\n\r\nEnvironment:\r\n\r\nTitanium SDK 3.1.2.v20130619101604\r\nAlloy 1.2.0\r\nAppcelerator Studio 3.1.1.201306131423\r\nNode 0.8.22\r\n\r\nClosing.", "updateAuthor": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-21T21:28:14.000+0000", "updated": "2013-06-21T21:28:14.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }