public static String quoteHtmlChars(String item) {
    if (item == null) {
      return null;
    }
    byte[] bytes = Bytes.toBytes(item);
    if (needsQuoting(bytes, 0, bytes.length)) {
      ByteArrayOutputStream buffer = new ByteArrayOutputStream();
      try {
        quoteHtmlChars(buffer, bytes, 0, bytes.length);
      } catch (IOException ioe) {
        // Won't happen, since it is a bytearrayoutputstream
      }
      return buffer.toString();
    } else {
      return item;
    }
  }
Quote the given item to make it html-safe.
@param item the string to quote
@return the quoted string
hbase-http/src/main/java/org/apache/hadoop/hbase/http/HtmlQuoting.java