Convert to lists on sending message

This commit is contained in:
M66B
2020-03-08 16:05:43 +01:00
parent 5f249f59b9
commit b66e940727
2 changed files with 57 additions and 3 deletions

View File

@@ -36,6 +36,7 @@ import com.sun.mail.util.QDecoderStream;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
@@ -513,7 +514,20 @@ public class MessageHelper {
// When sending message
if (identity != null) {
document.select("div[fairemail=signature],div[fairemail=reference]").removeAttr("fairemail");
Elements sig = document.select("div[fairemail=signature]");
Elements ref = document.select("div[fairemail=reference]");
sig.remove();
ref.remove();
HtmlHelper.convertLists(document);
sig.removeAttr("fairemail");
ref.removeAttr("fairemail");
for (Element e : sig)
document.body().appendChild(e);
for (Element e : ref)
document.body().appendChild(e);
DB db = DB.getInstance(context);
try {