mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-30 17:40:34 +01:00
Convert mailto body to HTML
This commit is contained in:
@@ -23,6 +23,7 @@ import android.content.Intent;
|
||||
import android.net.MailTo;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.text.Html;
|
||||
import android.text.Spanned;
|
||||
import android.text.TextUtils;
|
||||
|
||||
@@ -108,8 +109,12 @@ public class ActivityCompose extends ActivityBase implements FragmentManager.OnB
|
||||
args.putString("subject", subject);
|
||||
|
||||
String body = mailto.getBody();
|
||||
if (body != null)
|
||||
args.putString("body", body);
|
||||
if (body != null) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String line : body.split("\\r?\\n"))
|
||||
sb.append("<span>").append(Html.escapeHtml(line)).append("<span><br>");
|
||||
args.putString("body", sb.toString());
|
||||
}
|
||||
}
|
||||
|
||||
if (intent.hasExtra(Intent.EXTRA_SHORTCUT_ID)) {
|
||||
|
||||
Reference in New Issue
Block a user