diff --git a/src/main/java/org/jsoup/Jsoup.java b/src/main/java/org/jsoup/Jsoup.java index 3c4e2b4aca..8bacbfd1b2 100644 --- a/src/main/java/org/jsoup/Jsoup.java +++ b/src/main/java/org/jsoup/Jsoup.java @@ -365,18 +365,22 @@ public static boolean isValid(String bodyHtml, Safelist safelist) { return new Cleaner(safelist).isValidBodyHtml(bodyHtml); } + @Deprecated public static String clean(String bodyHtml, String baseUri, Whitelist whitelist, Document.OutputSettings outputSettings) { return clean(bodyHtml, baseUri, whitelist.getSafelist(), outputSettings); } + @Deprecated public static boolean isValid(String bodyHtml, Whitelist whitelist) { return isValid(bodyHtml, whitelist.getSafelist()); } + @Deprecated public static String clean(String bodyHtml, Whitelist whitelist) { return clean(bodyHtml, whitelist.getSafelist()); } + @Deprecated public static String clean(String bodyHtml, String baseUri, Whitelist whitelist) { return clean(bodyHtml, baseUri, whitelist.getSafelist()); } diff --git a/src/main/java/org/jsoup/safety/Cleaner.java b/src/main/java/org/jsoup/safety/Cleaner.java index dc52dc030d..f430d1db29 100644 --- a/src/main/java/org/jsoup/safety/Cleaner.java +++ b/src/main/java/org/jsoup/safety/Cleaner.java @@ -45,6 +45,7 @@ public Cleaner(Safelist safelist) { this.safelist = safelist; } + @Deprecated public Cleaner(Whitelist whitelist) { this(whitelist.getSafelist()); } diff --git a/src/main/java/org/jsoup/safety/Whitelist.java b/src/main/java/org/jsoup/safety/Whitelist.java index f1ca8ccd7e..acd2381b0a 100644 --- a/src/main/java/org/jsoup/safety/Whitelist.java +++ b/src/main/java/org/jsoup/safety/Whitelist.java @@ -5,6 +5,7 @@ import org.jsoup.nodes.Element; import org.jsoup.safety.Safelist.TagName; +@Deprecated public class Whitelist { protected Safelist safelist;