Improved formatting

This commit is contained in:
M66B
2019-02-10 12:01:21 +00:00
parent cba389c103
commit 07a0bd7bde
10 changed files with 109 additions and 59 deletions

View File

@@ -22,7 +22,6 @@ package eu.faircode.email;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.Html;
import android.text.Spanned;
import android.text.TextUtils;
import android.view.MenuItem;
@@ -131,8 +130,7 @@ public class ActivityCompose extends ActivityBilling implements FragmentManager.
CharSequence body = intent.getCharSequenceExtra(Intent.EXTRA_TEXT);
if (body != null)
if (body instanceof Spanned)
args.putString("body",
Jsoup.clean(Html.toHtml((Spanned) body), Whitelist.relaxed()));
args.putString("body", Jsoup.clean(HtmlHelper.toHtml((Spanned) body), Whitelist.relaxed()));
else
args.putString("body", body.toString()); // TODO: clean?
}