mirror of https://github.com/M66B/FairEmail.git
Simplify addresses/links in plain text
This commit is contained in:
parent
0abf36ac0c
commit
203854603f
|
@ -1209,9 +1209,14 @@ public class HtmlHelper {
|
|||
|
||||
public void tail(Node node, int depth) {
|
||||
String name = node.nodeName();
|
||||
if ("a".equals(name))
|
||||
if ("a".equals(name)) {
|
||||
String addr = node.attr("href").toLowerCase();
|
||||
if (addr.startsWith("mailto:"))
|
||||
addr = addr.substring("mailto:".length());
|
||||
String text = ((Element) node).text().toLowerCase();
|
||||
if (!text.contains(addr))
|
||||
append("[" + node.attr("href") + "]");
|
||||
else if ("img".equals(name))
|
||||
} else if ("img".equals(name))
|
||||
append("[" + node.attr("src") + "]");
|
||||
else if ("th".equals(name) || "td".equals(name)) {
|
||||
Node next = node.nextSibling();
|
||||
|
|
Loading…
Reference in New Issue