Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LANG-1303 : Escape HTML characters once #222

Closed
wants to merge 3 commits into from

Conversation

SampannaKahu
Copy link

@SampannaKahu SampannaKahu commented Dec 25, 2016

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 < 1000kg

At my workplace, we felt the need for a method in StringEscapeUtils which does not escape already escaped characters.

This prevents single, double or recursive escaping of html characters.
…gregateTranslator.

2. Added escapeHtml3Once() method.
3. Commenting improvements.
@PascalSchumacher
Copy link
Contributor

Thanks for the pull request. 👍

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!

@SampannaKahu
Copy link
Author

Thanks Pascal.
I have raised a pull request at commons-text: apache/commons-text#23

@PascalSchumacher
Copy link
Contributor

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants