Why was org.apache.common.lang3 StringEscapeUtils deprecated?

前端 未结 4 1175
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-01 01:53

I couldn\'t find any explanation why StringEscapeUtils was deprecated from Apache Lang3 v3.7.

https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/l

4条回答
  •  粉色の甜心
    2021-02-01 02:34

    Do below steps

    • Add below dependency to your pom.xml (if using maven)

         org.apache.commons
         commons-text
         1.4

    • Import correct package as below
      import org.apache.commons.text.StringEscapeUtils;

    • There is no such method unescapeHtml() in this class anymore, instead its two variations are available unescapeHtml3() and unescapeHtml4()
    • Use unescapeHtml3() to unescape Html 3.0 characters
    • Use unescapeHtml4() to unescape Html 4.0 characters

提交回复
热议问题