From dd8684be88595e5cd98011aa5979cc2c54f47dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Haarla=CC=88nder?= Date: Thu, 16 Mar 2023 13:59:25 +0100 Subject: [PATCH] Jsoup --- src/main/java/de/mpg/imeji/logic/util/StringHelper.java | 4 ++-- src/main/java/de/mpg/imeji/presentation/beans/UtilBean.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/mpg/imeji/logic/util/StringHelper.java b/src/main/java/de/mpg/imeji/logic/util/StringHelper.java index b27598b8e..54d22d9fb 100644 --- a/src/main/java/de/mpg/imeji/logic/util/StringHelper.java +++ b/src/main/java/de/mpg/imeji/logic/util/StringHelper.java @@ -6,7 +6,7 @@ import org.apache.commons.codec.digest.DigestUtils; import org.jsoup.Jsoup; -import org.jsoup.safety.Whitelist; +import org.jsoup.safety.Safelist; import de.mpg.imeji.exceptions.ImejiException; @@ -139,7 +139,7 @@ public static boolean hasInvalidTags(String s) { if (StringHelper.isNullOrEmptyTrim(s)) { return false; } - if (!Jsoup.isValid(s, Whitelist.relaxed())) { + if (!Jsoup.isValid(s, Safelist.relaxed())) { return true; } return false; diff --git a/src/main/java/de/mpg/imeji/presentation/beans/UtilBean.java b/src/main/java/de/mpg/imeji/presentation/beans/UtilBean.java index 1978238e2..d0806cc27 100644 --- a/src/main/java/de/mpg/imeji/presentation/beans/UtilBean.java +++ b/src/main/java/de/mpg/imeji/presentation/beans/UtilBean.java @@ -6,7 +6,7 @@ import javax.faces.bean.ManagedBean; import org.jsoup.Jsoup; -import org.jsoup.safety.Whitelist; +import org.jsoup.safety.Safelist; import de.mpg.imeji.logic.config.Imeji; import de.mpg.imeji.logic.config.ImejiProperties; @@ -38,7 +38,7 @@ public String getBaseUri() { } public String cleanHtml(String s) { - return Jsoup.clean(s, Whitelist.basic()); + return Jsoup.clean(s, Safelist.basic()); } }