Use selected font for plain text messages

pull/168/head
M66B 5 years ago
parent c81d4bdad2
commit f1606ebb37

@ -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());
}

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

Loading…
Cancel
Save