{ "id": "142981", "key": "TIMOB-18394", "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": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2015-12-01T00:17:54.000+0000", "created": "2015-01-16T19:26:45.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "SupportTeam" ], "versions": [ { "id": "16676", "description": "Release 3.4.1", "name": "Release 3.4.1", "archived": false, "released": true, "releaseDate": "2014-11-14" }, { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" } ], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2017-03-14T05:04:53.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": "11500", "name": "MobileWeb", "description": "Mobile Web (HTML) Platform" } ], "description": "h4. Problem Description\r\nIf you try to use new lines or similar to create format to a message body, the resultant text in the mail app (either gmail or mail) will be wrongly shown. \r\n\r\nExample: \r\n\r\n{code}\r\nvar messageBody = 'I would like to share this awesome app with you: '+\r\n '\\n\\nApple: http://google.com'+\r\n '\\nAndroid: http://google.com'+\r\n '\\n\\nPlease note, the this app is intended for awesome people '+\r\n 'whose employer are awesome. The app '+\r\n 'will only work for those who are awesome.';\r\n{code}\r\n\r\nWill be added to the mail as shown, Ignoring the format. \r\n\r\n{code}\r\nI would like to share this awesome app with you: %0A%0AApple: http://google.com%0AAndroid: http://google.com%0A%0APlease note, the this app is intended for awesome people whose employer are awesome. The app will only work for those who are awesome.\r\n{code}\r\n\r\n\r\n\r\nh4. Steps to reproduce\r\n1. Create a new mobile project Classic Titanium\r\n2. Paste this code to app.js:\r\n{code}\r\nvar win = Ti.UI.createWindow({backgroundColor:'white'});\r\nvar label = Ti.UI.createLabel({text:\"click here\"});\r\n\r\nfunction doClick(e) {\r\n var messageBody = 'I would like to share this awesome app with you: '+\r\n '\\n\\nApple: http://google.com'+\r\n '\\nAndroid: http://google.com'+\r\n '\\n\\nPlease note, the this app is intended for awesome people '+\r\n 'whose employer are awesome. The app '+\r\n 'will only work for those who are awesome.';\r\n var data = {\r\n subject : 'The most awesome App',\r\n recipient : '',\r\n messageBody : messageBody\r\n }\r\n openFeedbackDialog(data);\r\n}\r\n\r\nfunction openFeedbackDialog(emailData){\r\n var subject = emailData.subject;\r\n var toRecipients = [emailData.recipient];\r\n var ccRecipients = [];\r\n var messageBody = emailData.messageBody;\r\n\r\n var emailDialog = Ti.UI.createEmailDialog({\r\n subject : subject,\r\n toRecipients : toRecipients,\r\n ccRecipients : ccRecipients,\r\n messageBody : messageBody\r\n }).open();\r\n};\r\n\r\nlabel.addEventListener(\"click\",doClick);\r\n\r\nwin.add(label);\r\nwin.open();\r\n{code}\r\n3. Deploy to mobile web, upload it to a webserver.\r\n4. Open that page in your Android within Chrome browser.\r\n5. Click on \"Click here\"\r\n6. Will open the email dialog, with the wrong text as shown. \r\n\r\nh4. Extra information\r\nIt only fails if you do the mix \"Mobile web + Chrome browser in Android + Mail/Gmail in Android\". \r\n", "attachment": [], "flagged": false, "summary": "MobileWeb: The text format in Message Body is broken", "creator": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "subtasks": [], "reporter": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "environment": "Ti Mobile SDK 3.5.0.GA, 3.4.1.GA\r\nAndroid 5.x, 4.x\r\nDevice Nexus 5", "closedSprints": [ { "id": 529, "state": "closed", "name": "2015 Sprint 24 SDK", "startDate": "2015-11-21T01:30:12.670Z", "endDate": "2015-12-05T01:30:00.000Z", "completeDate": "2015-12-07T03:57:17.094Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "371702", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Mobile web uses the {{mailto:}} protocol which the browser will open using the default mail client. Since the email body is put in the URL, it needs to be encoded and thus {{\\\\n}} becomes {{%0A}}. This is the correct behavior.\r\n\r\nThe problem is Chrome for Android and/or the default Android mail client doesn't properly decode the body. Here's the Chromium bug: https://code.google.com/p/chromium/issues/detail?id=424889. As stated in the Chromium ticket, it appears to have been fixed.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2015-12-01T00:17:54.000+0000", "updated": "2015-12-01T00:17:54.000+0000" }, { "id": "411969", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue is not our bug.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-14T05:04:53.000+0000", "updated": "2017-03-14T05:04:53.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }