code: public static String escapeHtml(String source) {
          if (source == null) {
              return null;
          }
          source = escapeXml(source);
          source = substitute(source, "\r", "");
          source = substitute(source, "\n", "<br/>\n");
          return source;
      }
docs: Replaces occurrences of special control characters in the given input with
  a HTML representation.<p>
  
  This method currently replaces line breaks to <code>&lt;br/&gt;</code> and special HTML chars
  like <code>&lt; &gt; &amp; &quot;</code> with their HTML entity representation.<p>
  
  @param source the String to escape
  
  @return the escaped String