commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Tompkins (JIRA)" <>
Subject [jira] [Commented] (TEXT-40) Escape HTML characters only once
Date Sat, 18 Feb 2017 14:53:44 GMT


Rob Tompkins commented on TEXT-40:

Interesting point. I think that I may have mechanism that can be used to maintain idempotency
of the escaping process. Either way though it seems like a good dev list discussion. 

I see if I can formulate the mechanics of how to maintain idempotency and bubble that up to
the dev list. Personally, I'm relatively indifferent on keeping the functionality. I, however,
can see an argument both ways: keeping v. removing.

> Escape HTML characters only once
> --------------------------------
>                 Key: TEXT-40
>                 URL:
>             Project: Commons Text
>          Issue Type: Improvement
>            Reporter: Sampanna Kahu
>            Assignee: Rob Tompkins
>            Priority: Minor
>              Labels: features, newbie
> If already escaped HTML characters are in the input test, they get escaped again using
> For example:
> If the input is:
> 100 kg & l t ; 1000kg <without the spaces>
> Then the output of escapeHtml4() becomes:
> 100kg & amp ; l t ; 1000kg <without the spaces>
> 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

View raw message