code: public static String unescapeEntities(String string, boolean inAttribute) {
          Tokeniser tokeniser = new Tokeniser(new CharacterReader(string), ParseErrorList.noTracking());
          return tokeniser.unescapeEntities(inAttribute);
      }
docs: Utility method to unescape HTML entities from a string
  @param string HTML escaped string
  @param inAttribute if the string is to be escaped in strict mode (as attributes are)
  @return an unescaped string