iOS 7.1.1: UIActionSheet strips HTML after sending emails

Originator:kevinchen2003
Number:rdar://17169599 Date Originated:04-Jun-2014 10:08 PM
Status:Open Resolved:
Product:iOS SDK Product Version:iOS 7.1.1 (11D201)
Classification:Other Bug Reproducible:Always
 
Summary:
Normally, when sending email with MFMailComposeViewController, the developer can set isHTML and pass in an NSString of HTML-formatted text. 

However, UIActionSheet appears to infer which actions are applicable based on the type of object it receives. I think NSString is interpreted as plain-text email when UIActionSheet brings up the mail composer on my behalf. Thus, isHTML is not set. 

However, the mail composer interprets the text as HTML anyway, and _displays_ it correctly formatted. But after sending, it removes the formatting and sends a plaintext email instead!

NSAttributedString is interpreted as HTML email -- why not use that instead? The problem is that it requires me to specify a font, which is excessive if I only need a bit of bolding or underline:

- The default font in "Cocoa HTML Writer" is Times, which is not the default font for emails. 
- If I set the font to Helvetica Neue, it looks normal to the sender but will look odd if the recipient doesn't have that font, or sets a different preferred font in their email client. Plus, this setup is fragile: it needs to be maintained if the default system font family/size changes in an OS release.

Steps to Reproduce:
1. Instantiate UIActionSheet
2. Pass it an NSString with HTML. I used "<!DOCTYPE html><html><head></head><body><strong>Hello,</strong> world!</body></html>"
3. Show the UIActionSheet
4. User taps the icon for the "Mail" action 
5. User fills in recipient and sends the email
6. Recipient opens the email

Expected Results:
The recipient receives the message with "Hello," bolded

Also, the HTML received is similar to: "<!DOCTYPE html><html><head></head><body><strong>Hello,</strong> world!</body></html>"

Actual Results:
The email is plain text and it simply says: "Hello, world!"

Version:
iOS 7.1.1 (11D201)

Notes:


Configuration:
iPhone 5s

Attachments:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!