Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-18394

MobileWeb: The text format in Message Body is broken

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Not Our Bug
    • Affects Version/s: Release 3.4.1, Release 3.5.0
    • Fix Version/s: None
    • Component/s: MobileWeb
    • Labels:
    • Environment:

      Ti Mobile SDK 3.5.0.GA, 3.4.1.GA
      Android 5.x, 4.x
      Device Nexus 5

    • Sprint:
      2015 Sprint 24 SDK

      Description

      Problem Description

      If 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.

      Example:

      var messageBody = 'I would like to share this awesome app with you: '+
                                      '\n\nApple: http://google.com'+
                                      '\nAndroid: http://google.com'+
                                      '\n\nPlease note, the this app is intended for awesome people '+
                                      'whose employer are awesome. The app '+
                                      'will only work for those who are awesome.';
      

      Will be added to the mail as shown, Ignoring the format.

      I 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.
      

      Steps to reproduce

      1. Create a new mobile project Classic Titanium
      2. Paste this code to app.js:

      var win = Ti.UI.createWindow({backgroundColor:'white'});
      var label = Ti.UI.createLabel({text:"click here"});
       
      function doClick(e) {
          var messageBody = 'I would like to share this awesome app with you: '+
                                      '\n\nApple: http://google.com'+
                                      '\nAndroid: http://google.com'+
                                      '\n\nPlease note, the this app is intended for awesome people '+
                                      'whose employer are awesome. The app '+
                                      'will only work for those who are awesome.';
              var data = {
                      subject : 'The most awesome App',
                      recipient : '',
                      messageBody : messageBody
              }
              openFeedbackDialog(data);
      }
       
      function openFeedbackDialog(emailData){
              var subject             = emailData.subject;
              var toRecipients        = [emailData.recipient];
              var ccRecipients        = [];
              var messageBody         = emailData.messageBody;
       
              var emailDialog = Ti.UI.createEmailDialog({
                      subject : subject,
                      toRecipients : toRecipients,
                      ccRecipients : ccRecipients,
                      messageBody : messageBody
              }).open();
      };
       
      label.addEventListener("click",doClick);
       
      win.add(label);
      win.open();
      

      3. Deploy to mobile web, upload it to a webserver.
      4. Open that page in your Android within Chrome browser.
      5. Click on "Click here"
      6. Will open the email dialog, with the wrong text as shown.

      Extra information

      It only fails if you do the mix "Mobile web + Chrome browser in Android + Mail/Gmail in Android".

        Attachments

          Activity

            People

            • Assignee:
              cbarber Chris Barber
              Reporter:
              mpmiranda Mauro Parra-Miranda
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-19612
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration