Skip to content

Commit

Permalink
Revert "Revert "Whitelist -> Safelist in jsoup""
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmith-hs authored Oct 18, 2022
1 parent 67def9b commit 2523bc8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import com.hubspot.jinjava.interpret.JinjavaInterpreter;
import java.util.regex.Pattern;
import org.jsoup.Jsoup;
import org.jsoup.safety.Whitelist;
import org.jsoup.safety.Safelist;

/**
* striptags(value) Strip SGML/XML tags and replace adjacent whitespace by one space.
Expand Down Expand Up @@ -42,7 +42,7 @@ public Object filter(Object object, JinjavaInterpreter interpreter, String... ar
}

String cleanedVal = Jsoup.parse(val).text();
cleanedVal = Jsoup.clean(cleanedVal, Whitelist.none());
cleanedVal = Jsoup.clean(cleanedVal, Safelist.none());

// backwards compatibility with Jsoup.parse
cleanedVal = cleanedVal.replaceAll(" ", " ");
Expand Down

0 comments on commit 2523bc8

Please sign in to comment.