private void addSourceHtmlToExport(Entry source,StringBuilder result) throws IOException {
  final String url=source.getSourceUrl();
  result.append("<div class=\"source\">\n");
  result.append("<div class=\"sourceTitle\">");
  String title=source.getSourceTitle();
  if (title == null || title.isEmpty()) {
    title=servletText.fragmentBlankTitle();
  }
  result.append(StringEscapeUtils.escapeHtml4(title));
  result.append("</div>\n");
  if (url != null && !url.isEmpty()) {
    result.append("<a target=\"_blank\" href=\"");
    result.append(StringEscapeUtils.escapeHtml4(url));
    result.append("\">");
    result.append(StringEscapeUtils.escapeHtml4(url));
    result.append("</a>\n");
  }
  result.append("</div>\n");
}

private void addSourceHtmlToExport ( Entry source , StringBuilder result ) throws IOException { final String url = source . getSourceUrl ( ) ; result . append ( "<div class=\"source\">\n" ) ; result . append ( "<div class=\"sourceTitle\">" ) ; String title = source . getSourceTitle ( ) ; if ( title == null || title . isEmpty ( ) ) { title = servletText . fragmentBlankTitle ( ) ; } result . append ( StringEscapeUtils . escapeHtml4 ( title ) ) ; result . append ( "</div>\n" ) ; if ( url != null && ! url . isEmpty ( ) ) { result . append ( "<a target=\"_blank\" href=\"" ) ; result . append ( StringEscapeUtils . escapeHtml4 ( url ) ) ; result . append ( "\">" ) ; result . append ( StringEscapeUtils . escapeHtml4 ( url ) ) ; result . append ( "</a>\n" ) ; } result . append ( "</div>\n" ) ; }
helper method . adds the html for a source to a list .
