{ "id": "97671", "key": "TIMOB-10046", "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": null, "resolutiondate": null, "created": "2012-07-19T15:32:56.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "core" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:43.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Run the below sample code in app.js\r\n\r\n{code}\r\nvar window = Titanium.UI.createWindow({\r\n \r\n});\r\n\r\nvar text_with_space_in_it = 'lfjdhljaksfh a sfa sasf';\r\nvar imageview = Ti.UI.createImageView({\r\n\t\r\n\timage:'http://i.ytimg.com/vi/' + text_with_space_in_it + '/2.jpg',\r\n\t\r\n\t\r\n})\r\n \r\n// work around is to replace the spaces with %20 or encode the uri\r\nwindow.add(imageview);\r\nwindow.open();\r\n{code}\r\n\r\nWork Around:\r\n{code}\r\n var spaces = new RegExp(' ','g'); var imgurl = url.replace(spaces,'%20');\r\nOR\r\n var encoded = encodeURI('http://abc.com/file name.png');\r\n{code}\r\n\r\nLog from the customer project is attached.", "attachment": [ { "id": "29899", "filename": "log.txt", "author": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-19T15:32:56.000+0000", "size": 3474, "mimeType": "text/plain" } ], "flagged": false, "summary": "iOS: Handle Invalid image type exception gracefully - application crashes with exception if url of image has 'space(s)' in it.", "creator": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Ti SDK 2.1.0 and iOS 5.1\r\n", "comment": { "comments": [ { "id": "246836", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue reproduces \n\nTested with\n\nTitanium Studio, build: 3.0.1.201212181159\nTitanium SDK version: 3.1.0 \nTitanium SDK version: 3.0.2 \niOS iPhone Simulator: iOS SDK version: 6.0", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-10T09:01:54.000+0000", "updated": "2013-04-10T09:01:54.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }