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 78126200BF7 for ; Mon, 26 Dec 2016 06:33:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 76E59160B34; Mon, 26 Dec 2016 05:33:05 +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 C7807160B2B for ; Mon, 26 Dec 2016 06:33:04 +0100 (CET) Received: (qmail 82335 invoked by uid 500); 26 Dec 2016 05:32:58 -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 82317 invoked by uid 99); 26 Dec 2016 05:32:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Dec 2016 05:32:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 8087F2C1F54 for ; Mon, 26 Dec 2016 05:32:58 +0000 (UTC) Date: Mon, 26 Dec 2016 05:32:58 +0000 (UTC) From: "Sampanna Kahu (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (LANG-1303) Escape HTML characters only once MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 26 Dec 2016 05:33:05 -0000 [ https://issues.apache.org/jira/browse/LANG-1303?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sampanna Kahu updated LANG-1303: -------------------------------- Description: 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 & l t ; 1000kg Then the output of escapeHtml4() becomes: 100kg & amp ; l t ; 1000kg At my workplace, we felt the need for a method in StringEscapeUtils which does not escape already escaped characters. I have attempted to create this method. Creating a pull request soon. was: 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. I have attempted to create this method. Creating a pull request soon. > Escape HTML characters only once > -------------------------------- > > Key: LANG-1303 > URL: https://issues.apache.org/jira/browse/LANG-1303 > Project: Commons Lang > Issue Type: Improvement > Components: lang.text.* > Reporter: Sampanna Kahu > Priority: Minor > Labels: features, newbie > > 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 & l t ; 1000kg > Then the output of escapeHtml4() becomes: > 100kg & amp ; l t ; 1000kg > At my workplace, we felt the need for a method in StringEscapeUtils which does not escape already escaped characters. > I have attempted to create this method. Creating a pull request soon. -- This message was sent by Atlassian JIRA (v6.3.4#6332)