1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-22 15:55:57 +00:00

Outlook 'compatible' highlight (2)

Rhetorical question: why does Microsoft not follow common standards?
This commit is contained in:
M66B 2024-10-30 13:27:07 +01:00
parent 692766be97
commit 99b616f383

View file

@ -4215,6 +4215,14 @@ public class HtmlHelper {
.attr("name", "viewport") .attr("name", "viewport")
.attr("content", "width=device-width, initial-scale=1.0"); .attr("content", "width=device-width, initial-scale=1.0");
// https://stackoverflow.design/email/base/mso/
if (!doc.body().select("mark").isEmpty())
doc.head().append("<!--[if mso]>\n" +
" <style>\n" +
" mark { background:yellow; mso-highlight:yellow; }\n" +
" </style>\n" +
"<![endif]-->\n");
for (Element span : doc.select("span")) { for (Element span : doc.select("span")) {
if (span.attr("dir").equals("rtl")) { if (span.attr("dir").equals("rtl")) {
Element next = span.nextElementSibling(); Element next = span.nextElementSibling();