You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by SampannaKahu <gi...@git.apache.org> on 2016/12/25 18:54:44 UTC

[GitHub] commons-lang pull request #222: LANG-1303 : Escape HTML characters once

GitHub user SampannaKahu opened a pull request:

    https://github.com/apache/commons-lang/pull/222

    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 StringEscapeUtils.escapeHtml4().
    
    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 https://github.com/SampannaKahu/commons-lang escape_html_once

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

    https://github.com/apache/commons-lang/pull/222.patch

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 <sa...@gmail.com>
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 <sa...@gmail.com>
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 <sa...@gmail.com>
Date:   2016-12-25T18:43:16Z

    Merge branch 'escape_html_once' of https://github.com/SampannaKahu/commons-lang 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] commons-lang pull request #222: LANG-1303 : Escape HTML characters once

Posted by SampannaKahu <gi...@git.apache.org>.
Github user SampannaKahu closed the pull request at:

    https://github.com/apache/commons-lang/pull/222


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

[GitHub] commons-lang issue #222: LANG-1303 : Escape HTML characters once

Posted by SampannaKahu <gi...@git.apache.org>.
Github user SampannaKahu commented on the issue:

    https://github.com/apache/commons-lang/pull/222
  
    Thanks Pascal.
    I have raised a pull request at commons-text: https://github.com/apache/commons-text/pull/23


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

[GitHub] commons-lang issue #222: LANG-1303 : Escape HTML characters once

Posted by PascalSchumacher <gi...@git.apache.org>.
Github user PascalSchumacher commented on the issue:

    https://github.com/apache/commons-lang/pull/222
  
    Thanks for the pull request. \U0001f44d 
    
    StringEscapeUtils was ported to commons-text and will soon deprecated in commons-lang.
    
    It would be nice if you could open a pull request at https://github.com/apache/commons-text
    
    Thanks!


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

[GitHub] commons-lang issue #222: LANG-1303 : Escape HTML characters once

Posted by PascalSchumacher <gi...@git.apache.org>.
Github user PascalSchumacher commented on the issue:

    https://github.com/apache/commons-lang/pull/222
  
    Thanks Sampanna!
    
    It would be nice if you would close this pull request. (I can not do it easily as this is a read-only repository.)
    
    Thanks!


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