code: public static RawData nl2br(Object data) {
          return new RawData(StringEscapeUtils.escapeHtml4(str(data)).replaceAll("(\\r\\n|\\n|\\r)", "<br/>"));
      }
docs: Change line break in the data string into <tt><br/></tt>
  @param data
  @return raw data of transformed result