Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D8AAB200BE6 for ; Sun, 25 Dec 2016 19:54:46 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CC54B160B2B; Sun, 25 Dec 2016 18:54:46 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1E965160B25 for ; Sun, 25 Dec 2016 19:54:45 +0100 (CET) Received: (qmail 46099 invoked by uid 500); 25 Dec 2016 18:54:45 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 46088 invoked by uid 99); 25 Dec 2016 18:54:44 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Dec 2016 18:54:44 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 93963DFBE6; Sun, 25 Dec 2016 18:54:44 +0000 (UTC) From: SampannaKahu To: issues@commons.apache.org Reply-To: issues@commons.apache.org Message-ID: Subject: [GitHub] commons-lang pull request #222: LANG-1303 : Escape HTML characters once Content-Type: text/plain Date: Sun, 25 Dec 2016 18:54:44 +0000 (UTC) archived-at: Sun, 25 Dec 2016 18:54:47 -0000 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 < 1000kg Then the output of escapeHtml4() becomes: 100kg &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 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 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. ---