commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SampannaKahu <>
Subject [GitHub] commons-lang pull request #222: LANG-1303 : Escape HTML characters once
Date Sun, 25 Dec 2016 18:54:44 GMT
GitHub user SampannaKahu opened a pull request:

    LANG-1303 : Escape HTML characters once

    Hi, this is my first time contributing to any open source project.
    The feature goes as follows:
    If already escaped HTML characters are in the input test, they get escaped again using
    For example:
    If the input is:
    100 kg &lt; 1000kg
    Then the output of escapeHtml4() becomes:
    100kg &amp;lt; 1000kg
    At my workplace, we felt the need for a method in StringEscapeUtils which does not escape
already escaped characters.

You can merge this pull request into a Git repository by running:

    $ git pull escape_html_once

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #222
commit a5786ee8bab5b06e53ddc436326fef3cd8f2adfa
Author: SampannaKahu <>
Date:   2016-12-23T19:00:47Z

    Adding a new html4 translator to escape HTML characters only once.
    This prevents single, double or recursive escaping of html characters.

commit a198671e2d4ced8d4363f5d7fd2aa3f60d236f16
Author: SampannaKahu <>
Date:   2016-12-23T19:25:47Z

    1. Using SingleLookupTranslator directly, instead of passing it to AggregateTranslator.
    2. Added escapeHtml3Once() method.
    3. Commenting improvements.

commit 4b21f7c5a1384bf6ced59121f1c36c962c3c939a
Author: SampannaKahu <>
Date:   2016-12-25T18:43:16Z

    Merge branch 'escape_html_once' of into escape_html_once


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 or file a JIRA ticket
with INFRA.

View raw message