Recommended method for escaping HTML in Java

前端 未结 11 853
南旧
南旧 2020-11-22 04:30

Is there a recommended way to escape <, >, \" and & characters when outputting HTML in plain Java code? (Other

11条回答
  •  清酒与你
    2020-11-22 04:53

    org.apache.commons.lang3.StringEscapeUtils is now deprecated. You must now use org.apache.commons.text.StringEscapeUtils by

        
            org.apache.commons
            commons-text
            ${commons.text.version}
        
    

提交回复
热议问题