<commit_before># ESAPI-PHP

This is the ESAPI php library. Development died out more or less in 2011 leaving a broken library but with a bunch of security classes that in my opinion are worth salvaging. From then on some people on Github worked on some basic clean up and getting the existing unit tests running.

This repository is my personal copy in order to get ESAPI ready for use in my own production environment. I am interested in narrowing down the ambition to create a good library for just input validation and output escaping. I will also try to create a new interface which doesn't need the use of a static class, but which allows instantiating an ESAPI object since it holds state, which means it's better not static.

I will push my work to github so others can benefit from it as well. I plan to make a production branch with a stripped down library in which I only include those classes that I have reviewed, cleaned up and for which I will try to complete the unit tests.

**Until further notice, none of the code in this repository has been peer-reviewed and comes without warranty.

As long as this readme does not contain any usage instructions, it means I haven't reached a point where I feel the library will be usable for others.**

## Current status

### August 2015

- HTMLPurifier updated to v 4.7.0
- Unit tests pass with the exception of incomplete ones (without errors or warnings)
- Basic code cleanup (trailing whitespace removed)<commit_msg>Fix markup in readme<commit_after># ESAPI-PHP

This is the ESAPI php library. Development died out more or less in 2011 leaving a broken library but with a bunch of security classes that in my opinion are worth salvaging. From then on some people on Github worked on some basic clean up and getting the existing unit tests running.

This repository is my personal copy in order to get ESAPI ready for use in my own production environment. I am interested in narrowing down the ambition to create a good library for just input validation and output escaping. I will also try to create a new interface which doesn't need the use of a static class, but which allows instantiating an ESAPI object since it holds state, which means it's better not static.

I will push my work to github so others can benefit from it as well. I plan to make a production branch with a stripped down library in which I only include those classes that I have reviewed, cleaned up and for which I will try to complete the unit tests.

**Until further notice, none of the code in this repository has been peer-reviewed and comes without warranty.**

**As long as this readme does not contain any usage instructions, it means I haven't reached a point where I feel the library will be usable for others.**

## Current status

### August 2015

- HTMLPurifier updated to v 4.7.0
- Unit tests pass with the exception of incomplete ones (without errors or warnings)
- Basic code cleanup (trailing whitespace removed)
{'fraction_non_alphanumeric': 0.02973977695167286, 'fraction_numerical': 0.007434944237918215, 'mean_word_length': 4.229681978798586, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4835625', 'n_tokens_mistral': 703, 'n_tokens_neox': 656, 'n_words': 506}