mirror of https://github.com/M66B/FairEmail.git
Fixed preformatted text
This commit is contained in:
parent
63ee1b1c99
commit
198612dac6
|
@ -5268,7 +5268,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
// Write decrypted body
|
||||
String text = Helper.readText(plain);
|
||||
String html = HtmlHelper.formatPre(text);
|
||||
String html = "<pre>" + HtmlHelper.formatPre(text) + "</pre>";
|
||||
Helper.writeText(message.getFile(context), html);
|
||||
db.message().setMessageStored(message.id, new Date().getTime());
|
||||
db.message().setMessageFts(message.id, false);
|
||||
|
|
|
@ -697,10 +697,11 @@ public class HtmlHelper {
|
|||
|
||||
// Pre formatted text
|
||||
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre
|
||||
for (Element pre : document.select("pre")) {
|
||||
pre.html(formatPre(pre.wholeText()));
|
||||
pre.tagName("div");
|
||||
}
|
||||
if (!view)
|
||||
for (Element pre : document.select("pre")) {
|
||||
pre.html(formatPre(pre.wholeText()));
|
||||
pre.tagName("div");
|
||||
}
|
||||
|
||||
// Code
|
||||
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code
|
||||
|
|
|
@ -1589,7 +1589,7 @@ public class MessageHelper {
|
|||
if (part.isMimeType("text/plain")) {
|
||||
if ("flowed".equalsIgnoreCase(ct.getParameter("format")))
|
||||
result = HtmlHelper.flow(result);
|
||||
result = "<div>" + HtmlHelper.formatPre(result) + "</div>";
|
||||
result = "<pre>" + HtmlHelper.formatPre(result) + "</pre>";
|
||||
} else if (part.isMimeType("text/html")) {
|
||||
if (TextUtils.isEmpty(charset)) {
|
||||
// <meta charset="utf-8" />
|
||||
|
|
Loading…
Reference in New Issue