I’m working with Spring and Hibernate. I’m using commons-lang.jar to escape and unescape some special characters using the StringEscapeUtils.escapeHtml() and StringEscapeUtils.unescapeHtml() of the class StringEscapeUtils respectively. It’s working exactly I want. There is no problem at all.
Now, I want to unescape the same characters which have already been escaped by the StringEscapeUtils.escapeHtml() method in JavaScript (not by using Java code at all). I tried escape() and unescape() JavaScript functions in turn but obviously these functions work differently than those mentioned in the StringEscapeUtils class.
Is there a way in JavaScript to unescape those characters which have already been escaped by StringEscapeUtils.escapeHtml()?
1 Answer