In the old days, we usually use the Apachecommons-lang3,StringEscapeUtilsclass to escape HTML, but this class is deprecated as of 3.6. // @deprecated as of 3.6, use commons-textimportorg.apache.commons.lang3.StringEscapeUtils; org.apache.commons.lang3.StringEscapeUtils is deprecated References Ap...