mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 12:44:42 +00:00
Experiment: Limit alternative plain content
This commit is contained in:
parent
d4e8e76d29
commit
a411ba7f99
1 changed files with 12 additions and 1 deletions
|
@ -570,6 +570,9 @@ public class MessageHelper {
|
|||
|
||||
// Build html body
|
||||
Document document = JsoupEx.parse(message.getFile(context));
|
||||
Element ref = null;
|
||||
if (BuildConfig.DEBUG)
|
||||
ref = document.select("div[fairemail=reference]").first();
|
||||
|
||||
// When sending message
|
||||
if (identity != null && send) {
|
||||
|
@ -653,7 +656,15 @@ public class MessageHelper {
|
|||
String htmlContent = document.html();
|
||||
String htmlContentType = "text/html; charset=" + Charset.defaultCharset().name();
|
||||
|
||||
String plainContent = HtmlHelper.getText(context, htmlContent);
|
||||
// Limit alternative plain content
|
||||
if (ref != null &&
|
||||
(message.plain_only == null || !message.plain_only)) {
|
||||
Element first = ref.select("blockquote").first();
|
||||
if (first != null)
|
||||
first.children().select("blockquote").remove();
|
||||
}
|
||||
|
||||
String plainContent = HtmlHelper.getText(context, document.html());
|
||||
String plainContentType = "text/plain; charset=" + Charset.defaultCharset().name();
|
||||
|
||||
if (format_flowed) {
|
||||
|
|
Loading…
Reference in a new issue