{ "id": "118246", "key": "ALOY-790", "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": "15601", "description": "2013 Sprint 17", "name": "2013 Sprint 17", "archived": true, "released": true, "releaseDate": "2013-08-23" } ], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2013-08-15T21:20:19.000+0000", "created": "2013-08-10T11:34:04.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "15570", "description": "Alloy 1.2.1", "name": "Alloy 1.2.1", "archived": false, "released": true, "releaseDate": "2013-08-27" } ], "issuelinks": [ { "id": "31132", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "118573", "key": "ALOY-789", "fields": { "summary": "Improperly escaping line terminators", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-22T13:21:00.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": [], "description": "*Problem*\r\nThe \\n will be replaced in /alloy/styles/thecontroller.js with a new line causing an error when the file is required ($.createStyle called for example). A test case for iOS is included below.\r\n\r\n*index.xml*\r\n{code:xml}\r\n\t\r\n\t\t\r\n{code}\r\n\r\n*index.tss*\r\n{code:css}\".container\": {\r\n\tbackgroundColor:\"white\"\r\n},\r\n\"Label\": {\r\n\twidth: Ti.UI.SIZE,\r\n\theight: Ti.UI.SIZE,\r\n\tcolor: \"#000\",\r\n\ttext:'Hello\\nworld'\r\n}{code}\r\n\r\n*index.js*\r\n{code:javascript}function doClick(e) {\r\n alert($.label.text);\r\n}\r\n\r\n$.index.open();\r\n\r\n$.createStyle({\r\n\tclasses:['test']\r\n});{code}\r\n\r\n*Error (iOS)*\r\n{code}[ERROR] : Script Error {\r\n[ERROR] : line = 1;\r\n[ERROR] : message = \"Parse error\";\r\n[ERROR] : name = SyntaxError;\r\n[ERROR] : sourceId = 284051488;\r\n[ERROR] : sourceURL = \"file://localhost/Users/hani/Library/Application%20Support/iPhone%20Simulator/6.1/Applications/BA328F3A-899A-4681-9A30-55085E4A2AA9/BugTest.app/alloy/styles/index.js\";\r\n[ERROR] : }\r\n[ERROR] : Script Error Module \"alloy/styles/index\" failed to leave a valid exports object{code}\r\n\r\n*Error (Android)*\r\n{code}08-15 14:08:06.745: E/TiExceptionHandler(8933): (main) [0,610] - Message: Uncaught SyntaxError: Unexpected token ILLEGAL\r\n08-15 14:08:06.810: E/V8Exception(8933): Exception occurred at alloy/styles/index.js:1: Uncaught SyntaxError: Unexpected token ILLEGAL{code}", "attachment": [], "flagged": false, "summary": "Alloy: Error when calling $.createStyle if the style file contains \\n", "creator": { "name": "hini", "key": "hini", "displayName": "Hani Hamadeh", "active": true, "timeZone": "Asia/Beirut" }, "subtasks": [], "reporter": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Alloy 1.2", "comment": { "comments": [ { "id": "266106", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Hani,\r\n\r\nPlease can you provide a simple reproducible test case for this? Be sure to include all code necessary for us to create a runnable project.\r\n\r\nThanks!", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-12T23:20:25.000+0000", "updated": "2013-08-12T23:20:25.000+0000" }, { "id": "266756", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and confirmed on iOS 6 simulator and Samsung Galaxy S2 2.3.6 with Ti SDK 3.1.1 GA and Alloy 1.2.1.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-15T21:11:19.000+0000", "updated": "2013-08-15T21:11:19.000+0000" }, { "id": "266759", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Duplicate of ALOY-789", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-15T21:20:19.000+0000", "updated": "2013-08-15T21:20:19.000+0000" }, { "id": "266760", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is resolved in ALOY-789 and is already in the 1.2.1 release candidate. You can get it like this:\r\n\r\n{code}\r\n[sudo] npm install -g alloy@1.2.1-cr\r\n{code}\r\n\r\nThe official 1.2.1 will be released early next week. If you guys would be so kind as to confirm that using 1.2.1-cr fixes the issue, that would be great.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-15T21:22:29.000+0000", "updated": "2013-08-15T21:24:42.000+0000" }, { "id": "266764", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Confirmed fixed with 1.2.1-cr", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-15T21:32:01.000+0000", "updated": "2013-08-15T21:32:01.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }