diff --git a/pom.xml b/pom.xml index c0e895f..8f88d44 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ org.jsoup jsoup - 1.14.2 + 1.15.3 jar diff --git a/src/main/java/com/jagrosh/jlyrics/LyricsClient.java b/src/main/java/com/jagrosh/jlyrics/LyricsClient.java index 319b0d4..a7169df 100644 --- a/src/main/java/com/jagrosh/jlyrics/LyricsClient.java +++ b/src/main/java/com/jagrosh/jlyrics/LyricsClient.java @@ -31,7 +31,7 @@ import org.jsoup.nodes.Document; import org.jsoup.nodes.Document.OutputSettings; import org.jsoup.nodes.Element; -import org.jsoup.safety.Whitelist; +import org.jsoup.safety.Safelist; /** * @@ -42,7 +42,7 @@ public class LyricsClient private final Config config = ConfigFactory.load(); private final HashMap cache = new HashMap<>(); private final OutputSettings noPrettyPrint = new OutputSettings().prettyPrint(false); - private final Whitelist newlineWhitelist = Whitelist.none().addTags("br", "p"); + private final Safelist newlineSafelist = Safelist.none().addTags("br", "p"); private final Executor executor; private final String defaultSource, userAgent; private final int timeout; @@ -178,6 +178,6 @@ public CompletableFuture getLyrics(String search, String source) private String cleanWithNewlines(Element element) { - return Jsoup.clean(Jsoup.clean(element.html(), newlineWhitelist), "", Whitelist.none(), noPrettyPrint); + return Jsoup.clean(Jsoup.clean(element.html(), newlineSafelist), "", Safelist.none(), noPrettyPrint); } }