I couldn't find any explanation why StringEscapeUtils was deprecated from Apache Lang3 v3.7.
What are we supposed to use now for HTML escaping/unescaping
I couldn't find any explanation why StringEscapeUtils was deprecated from Apache Lang3 v3.7.
What are we supposed to use now for HTML escaping/unescaping
The class was moved from package
to
You can replace the deprecated library easily:
In your build.gradle:
And in your class using
StringEscapeUtils
make sure you import the correct class:1.8 is currently the newest version (last checked October 22nd 2019) but you can check the versions at maven: https://mvnrepository.com/artifact/org.apache.commons/commons-text
From Commons-lang 3.6 release notes:
Per the deprecation listing, it was moved to a new project -- commons-text
Do below steps
Add below dependency to your pom.xml (if using maven)
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.4</version>
<dependency>
Import correct package as below
import org.apache.commons.text.StringEscapeUtils;