+    return StringEscapeUtils.escapeHtml3(sb.toString()).replace("\n", "<br/>");
Why not just use sb.toString().replace("\n", "<br/>")? In this case, we don't need to introduce org.apache.commons dependency.