Github user britter commented on a diff in the pull request: https://github.com/apache/commons-lang/pull/213#discussion_r88745694 --- Diff: src/main/java/org/apache/commons/lang3/StringEscapeUtils.java --- @@ -429,6 +429,65 @@ public StringEscapeUtils() { super(); } + /** + * <p>Convenience wrapper for {@link java.lang.StringBuilder} providing escape methods.</p> + * + * <p>Example:</p> + * <pre> + * new Builder(ESCAPE_HTML4) + * .append("<p>") + * .escape("This is paragraph 1 and special chars like & get escaped.") + * .append("</p><p>") + * .escape("This is paragraph 2 & more...") + * .append("</p>") + * .toString() + * </pre> + * + * @since 3.6 + */ + public static class Builder { + + private final StringBuilder sb; --- End diff -- Actually, I'm now thinking that it may be good to have a real decorator for `Appendables` with decorates any `Appendable` by piping input to the append methods through the translator first. WDYT?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---