1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-25 09:17:58 +00:00

Use selected font for plain text messages

This commit is contained in:
M66B 2019-11-16 19:27:40 +01:00
parent c81d4bdad2
commit f1606ebb37
2 changed files with 5 additions and 2 deletions

View file

@ -135,6 +135,7 @@ public class HtmlHelper {
Whitelist whitelist = Whitelist.relaxed()
.addTags("hr", "abbr", "big", "font")
.addAttributes("pre", "plain")
.removeTags("col", "colgroup", "thead", "tbody")
.removeAttributes("table", "width")
.removeAttributes("td", "colspan", "rowspan", "width")
@ -327,7 +328,9 @@ public class HtmlHelper {
for (int i = 0; i < level; i++)
sb.append("</blockquote>");
pre.tagName("tt"); // monospace
String plain = pre.attr("plain");
pre.tagName(Boolean.parseBoolean(plain) ? "div" : "tt");
pre.html(sb.toString());
}

View file

@ -1042,7 +1042,7 @@ public class MessageHelper {
}
if (part == plain)
result = "<pre>" + result + "</pre>";
result = "<pre plain=\"true\">" + result + "</pre>";
return result;
}