1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-01 04:35:57 +00:00

Jsoup 1.14.2

This commit is contained in:
M66B 2021-09-11 20:44:55 +02:00
parent d2890c6808
commit 62e700eb10
2 changed files with 9 additions and 9 deletions

View file

@ -293,7 +293,7 @@ dependencies {
def biometric_version = "1.2.0-alpha03"
def billingclient_version = "3.0.3"
def javamail_version = "1.6.7"
def jsoup_version = "1.13.1"
def jsoup_version = "1.14.2"
def css_version = "0.9.29"
def jax_version = "2.3.0-jaxb-1.0.6"
def dnsjava_version = "2.1.9"

View file

@ -83,7 +83,7 @@ import org.jsoup.nodes.Element;
import org.jsoup.nodes.Node;
import org.jsoup.nodes.TextNode;
import org.jsoup.safety.Cleaner;
import org.jsoup.safety.Whitelist;
import org.jsoup.safety.Safelist;
import org.jsoup.select.Elements;
import org.jsoup.select.NodeFilter;
import org.jsoup.select.NodeTraversor;
@ -442,7 +442,7 @@ public class HtmlHelper {
if (parse_classes)
sheets = parseStyles(parsed.head().select("style"));
Whitelist whitelist = Whitelist.relaxed()
Safelist safelist = Safelist.relaxed()
.addTags("hr", "abbr", "big", "font", "dfn", "del", "s", "tt")
.addAttributes(":all", "class")
.addAttributes(":all", "style")
@ -461,17 +461,17 @@ public class HtmlHelper {
.addProtocols("img", "src", "data")
.removeTags("a").addAttributes("a", "href", "title");
if (text_color)
whitelist.addAttributes("font", "color");
safelist.addAttributes("font", "color");
if (text_size)
whitelist.addAttributes("font", "size");
safelist.addAttributes("font", "size");
if (text_font)
whitelist.addAttributes("font", "face");
safelist.addAttributes("font", "face");
if (text_align)
whitelist.addTags("center").addAttributes(":all", "align");
safelist.addTags("center").addAttributes(":all", "align");
if (!view)
whitelist.addProtocols("img", "src", "content");
safelist.addProtocols("img", "src", "content");
final Document document = new Cleaner(whitelist).clean(parsed);
final Document document = new Cleaner(safelist).clean(parsed);
// Remove tracking pixels
if (disable_tracking)