summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorian Zschocke <f.zschocke+git@gmail.com>2023-10-31 18:27:35 +0100
committerFlorian Zschocke <f.zschocke+git@gmail.com>2023-10-31 18:27:35 +0100
commitf124dfca7f8ec97b1f28cb5d258d8ee5d1da9b30 (patch)
tree45371a88d92f9df45d921f6e50f5d8be31afd248 /src
parentc706290a085761d0af3a20a07ef82ea47424c031 (diff)
downloadgitblit-f124dfca7f8ec97b1f28cb5d258d8ee5d1da9b30.tar.gz
gitblit-f124dfca7f8ec97b1f28cb5d258d8ee5d1da9b30.zip
dep: Update JSoup to 1.16.2
Update JSoup to version 1.16.2. This requires renaming `Whitelist` to `Safelist`, because the class name was changed in version 1.15.1 in a breaking change.
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/gitblit/utils/JSoupXssFilter.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/gitblit/utils/JSoupXssFilter.java b/src/main/java/com/gitblit/utils/JSoupXssFilter.java
index aec22411..f2702813 100644
--- a/src/main/java/com/gitblit/utils/JSoupXssFilter.java
+++ b/src/main/java/com/gitblit/utils/JSoupXssFilter.java
@@ -18,7 +18,7 @@ package com.gitblit.utils;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.safety.Cleaner;
-import org.jsoup.safety.Whitelist;
+import org.jsoup.safety.Safelist;
import com.google.inject.Inject;
import com.google.inject.Singleton;
@@ -38,7 +38,7 @@ public class JSoupXssFilter implements XssFilter {
@Inject
public JSoupXssFilter() {
- none = new Cleaner(Whitelist.none());
+ none = new Cleaner(Safelist.none());
relaxed = new Cleaner(getRelaxedWhiteList());
}
@@ -64,8 +64,8 @@ public class JSoupXssFilter implements XssFilter {
* https://github.com/github/markup/tree/master#html-sanitization
* @return a loose HTML whitelist
*/
- protected Whitelist getRelaxedWhiteList() {
- return new Whitelist()
+ protected Safelist getRelaxedWhiteList() {
+ return new Safelist()
.addTags(
"a", "b", "blockquote", "br", "caption", "cite", "code", "col",
"colgroup", "dd", "del", "div", "dl", "dt", "em", "h1", "h2", "h3", "h4", "h5", "h6", "hr",