mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 13:47:05 +02:00
Added support for address element
This commit is contained in:
@@ -539,7 +539,7 @@ public class HtmlHelper {
|
||||
sheets = parseStyles(parsed.head().select("style"));
|
||||
|
||||
Safelist safelist = Safelist.relaxed()
|
||||
.addTags("hr", "abbr", "big", "font", "dfn", "del", "s", "tt", "mark")
|
||||
.addTags("hr", "abbr", "big", "font", "dfn", "del", "s", "tt", "mark", "address")
|
||||
.addAttributes(":all", "class")
|
||||
.addAttributes(":all", "style")
|
||||
.addAttributes("span", "dir")
|
||||
@@ -1100,6 +1100,12 @@ public class HtmlHelper {
|
||||
hs.attr("x-line-after", "true");
|
||||
}
|
||||
|
||||
// Replace addresses by link
|
||||
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/address
|
||||
for (Element address : document.select("address"))
|
||||
address.tagName("a")
|
||||
.attr("href", "geo:0,0?q=" + Uri.encode(address.text()));
|
||||
|
||||
// Paragraphs
|
||||
for (Element p : document.select("p")) {
|
||||
p.tagName("div");
|
||||
|
||||
Reference in New Issue
Block a user