{ "id": "98215", "key": "TIMOB-10213", "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": [], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2017-07-26T02:58:42.000+0000", "created": "2012-07-27T11:57:48.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "api" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-07-26T02:58:42.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": "10224", "name": "TiAPI", "description": "This component is used for cross-platform API work. Specifications are most likely to use this component." } ], "description": "h2. Expected result\r\n\r\nTi.Locale.getString() and it's alias L() shouldn't accept a function as an argument. Both should throw an error is one is supplied.\r\n\r\nh2. Actual result\r\n\r\nYou can pass arbitrary functions, for example:\r\n\r\nTi.Locale.getString(alert('foo')) <- shows the alert box\r\nTi.Locale.getString(console.log('foo')) <- logs to the console\r\n\r\n", "attachment": [], "flagged": false, "summary": "TiAPI: Ti.Locale.getString() and L() accept arbitrary functions", "creator": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "environment": null, "comment": { "comments": [ { "id": "210255", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "A bit more explicit test case:\r\n\r\n{code}\r\nvar lbl = Ti.UI.createLabel({\r\n text: Ti.Locale.getString(console.log('foo'))\r\n});\r\nwin.add(lbl);\r\n{code}", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2012-07-27T12:00:12.000+0000", "updated": "2012-07-27T12:00:12.000+0000" }, { "id": "424715", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing due to inactivity. If this issue still exists, please raise a new ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-07-26T02:58:42.000+0000", "updated": "2017-07-26T02:58:42.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }