<commit_before>HTML5 Purify
====================

HTML5 Purifier - a fast and small footprint HTML5 purifier. The module uses a whitelist based approach to filter malicious characters,tags, attributes and attribute values while keeping the resulting output HTML5 compliant. It uses <a href="https://github.com/yahoo/context-parser">context parser</a> for parsing the input string, <a href="https://github.com/yahoo/xss-filters">xss filters</a> for filtering URI attribute values and <a href="https://github.com/yahoo/css-js">css-js</a> for filtering CSS data within the HTML input.

## Quick Start 

Install html-purify from the npm repo
```shell
npm install html-purify
```

Server side use(nodejs)

```js
/* create the html purifier */
var Purifier = require('html-purify');
var purifier = new Purifier();

var input = '...'; 
/* filter the input string */
var result = purifier.purify(input);
```

## Development

### How to build
```shell
npm install
npm run-script build
```

### How to test
```shell
npm test
```

## License

This software is free to use under the Yahoo Inc. BSD license.
See the [LICENSE file][] for license text and copyright information.

[LICENSE file]: ./LICENSE
<commit_msg>add badges<commit_after>HTML5 Purify
====================

HTML5 Purifier - a fast and small footprint HTML5 purifier. The module uses a whitelist based approach to filter malicious characters,tags, attributes and attribute values while keeping the resulting output HTML5 compliant. It uses <a href="https://github.com/yahoo/context-parser">context parser</a> for parsing the input string, <a href="https://github.com/yahoo/xss-filters">xss filters</a> for filtering URI attribute values and <a href="https://github.com/yahoo/css-js">css-js</a> for filtering CSS data within the HTML input.

[![npm version][npm-badge]][npm]
[![dependency status][dep-badge]][dep-status]

[npm]: https://www.npmjs.org/package/html-purify
[npm-badge]: https://img.shields.io/npm/v/html-purify.svg?style=flat-square
[dep-status]: https://david-dm.org/yahoo/html-purify
[dep-badge]: https://img.shields.io/david/yahoo/html-purify.svg?style=flat-square


## Quick Start 

Install html-purify from the npm repo
```shell
npm install html-purify
```

Server side use(nodejs)

```js
/* create the html purifier */
var Purifier = require('html-purify');
var purifier = new Purifier();

var input = '...'; 
/* filter the input string */
var result = purifier.purify(input);
```

## Development

### How to build
```shell
npm install
npm run-script build
```

### How to test
```shell
npm test
```

## License

This software is free to use under the Yahoo Inc. BSD license.
See the [LICENSE file][] for license text and copyright information.

[LICENSE file]: ./LICENSE

{'fraction_non_alphanumeric': 0.14499089253187614, 'fraction_numerical': 0.0029143897996357013, 'mean_word_length': 4.592668024439918, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 10, 'lorem ipsum': 0, 'www.': 1, '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': '7159152', 'n_tokens_mistral': 865, 'n_tokens_neox': 798, 'n_words': 293}