mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-26 01:36:55 +00:00
Use selected font for plain text messages
This commit is contained in:
parent
c81d4bdad2
commit
f1606ebb37
2 changed files with 5 additions and 2 deletions
|
@ -135,6 +135,7 @@ public class HtmlHelper {
|
||||||
|
|
||||||
Whitelist whitelist = Whitelist.relaxed()
|
Whitelist whitelist = Whitelist.relaxed()
|
||||||
.addTags("hr", "abbr", "big", "font")
|
.addTags("hr", "abbr", "big", "font")
|
||||||
|
.addAttributes("pre", "plain")
|
||||||
.removeTags("col", "colgroup", "thead", "tbody")
|
.removeTags("col", "colgroup", "thead", "tbody")
|
||||||
.removeAttributes("table", "width")
|
.removeAttributes("table", "width")
|
||||||
.removeAttributes("td", "colspan", "rowspan", "width")
|
.removeAttributes("td", "colspan", "rowspan", "width")
|
||||||
|
@ -327,7 +328,9 @@ public class HtmlHelper {
|
||||||
for (int i = 0; i < level; i++)
|
for (int i = 0; i < level; i++)
|
||||||
sb.append("</blockquote>");
|
sb.append("</blockquote>");
|
||||||
|
|
||||||
pre.tagName("tt"); // monospace
|
String plain = pre.attr("plain");
|
||||||
|
pre.tagName(Boolean.parseBoolean(plain) ? "div" : "tt");
|
||||||
|
|
||||||
pre.html(sb.toString());
|
pre.html(sb.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1042,7 +1042,7 @@ public class MessageHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (part == plain)
|
if (part == plain)
|
||||||
result = "<pre>" + result + "</pre>";
|
result = "<pre plain=\"true\">" + result + "</pre>";
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue