{ "id": "118573", "key": "ALOY-789", "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": "15570", "description": "Alloy 1.2.1", "name": "Alloy 1.2.1", "archived": false, "released": true, "releaseDate": "2013-08-27" }, { "id": "15601", "description": "2013 Sprint 17", "name": "2013 Sprint 17", "archived": true, "released": true, "releaseDate": "2013-08-23" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-08-15T15:29:40.000+0000", "created": "2013-08-15T14:40:59.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "qe-testadded" ], "versions": [ { "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" } ], "issuelinks": [ { "id": "31132", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "118246", "key": "ALOY-790", "fields": { "summary": "Alloy: Error when calling $.createStyle if the style file contains \\n", "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": "High", "id": "2" }, "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": "2013-08-28T23:40:19.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": "12329", "name": "Runtime", "description": "Generic bucket for uncategorized runtime issues" }, { "id": "13603", "name": "Styling", "description": "TSS, dynamic styling, styling API" } ], "description": "When creating runtime styles, the styler.js module is improperly escaping certain escape sequences, most notably line terminators. The following line in a TSS file:\r\n\r\n{code}\r\ntext: 'this is a \\nlinebreak'\r\n{code}\r\n\r\nis actually rendering the line break in the generated code, instead of preserving the given text string. The line terminators that should specifically be handled are listed here: \r\n\r\nhttp://es5.github.io/#x7.3", "attachment": [], "flagged": false, "summary": "Improperly escaping line terminators", "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": "266669", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "commit: https://github.com/appcelerator/alloy/commit/1f0e84a68f8e5b56a464b6d968f6965257e0b358 \r\n\r\nFunctional test should be performed on the 1_2_X branch:\r\n\r\n{code}\r\nsudo npm install -g git://github.com/appcelerator/alloy.git#1_2_X\r\n{code}\r\n\r\nAnd here are the steps:\r\n\r\n# Create a default alloy app\r\n# Set the index.xml like this:\r\n{code:xml}\r\n\r\n\t\r\n\t\t\r\n\r\n{code}\r\n# Set the index.tss like this:\r\n{code:javascript}\r\n\".container\": {\r\n\tbackgroundColor:\"white\"\r\n}\r\n\r\n\"Label\": {\r\n\twidth: Ti.UI.SIZE,\r\n\theight: Ti.UI.SIZE,\r\n\tcolor: \"#000\",\r\n\ttext: \"I have a \\ntab\"\r\n}\r\n{code}\r\n# Run the app\r\n# Ensure that the generated \"Resources/alloy/styles/index.js\" file has no rendered line breaks in it.\r\n# Package the app for Android. Ensure that is executes successfully.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-15T15:29:40.000+0000", "updated": "2013-08-15T15:29:40.000+0000" }, { "id": "266768", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Another confirmation that this was resolved is in the duplicate ALOY-790", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-15T21:52:34.000+0000", "updated": "2013-08-15T21:52:34.000+0000" }, { "id": "267170", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested the above code with:\nAppcelerator Studio, build: 3.1.2.201308091728\nTitanum SDK, build:3.1.3.v20130816184556 \nAlloy: 1.2.1-cr\nCLI: 3.1.2\nDevice:\nGalaxy Note2 Android version: 4.1.2\n\nFollowed test steps successfully. ", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-19T18:37:03.000+0000", "updated": "2013-08-19T18:37:03.000+0000" }, { "id": "268771", "author": { "name": "orangedigital", "key": "orangedigital", "displayName": "Thierry Ruiz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "However, now when I use a line break into a view.xml file (example below) the line break code is not interpreted anymore and considered/showed as part of the main string. (Tested on iPhone Simulator)\r\n\r\n