<commit_before>CallbackValidator
=================

**CallbackValidator** is a tiny library that allows you to **validate a JSONP
callback** in order to prevent XSS attacks.

[![Build
Status](https://travis-ci.org/willdurand/CallbackValidator.png?branch=master)](https://travis-ci.org/willdurand/CallbackValidator)


Usage
-----

```php
$validator = new \CallbackValidator\CallbackValidator();

$validator->validate('JSONP.callback');
// returns `true` or `false` depending on the given callback value
```


Installation
------------
<commit_msg>Fix README<commit_after>CallbackValidator
=================

**CallbackValidator** allows you to **validate a JSONP callback** in order to
prevent XSS attacks.

[![Build
Status](https://travis-ci.org/willdurand/CallbackValidator.png?branch=master)](https://travis-ci.org/willdurand/CallbackValidator)


Usage
-----

```php
$validator = new \CallbackValidator\CallbackValidator();

$validator->validate('JSONP.callback');
// returns `true`

$validator->validate('(function xss(x){evil()})');
// returns `false`
```


Installation
------------

{'fraction_non_alphanumeric': 0.20036764705882354, 'fraction_numerical': 0.0, 'mean_word_length': 5.117977528089888, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6754293', 'n_tokens_mistral': 325, 'n_tokens_neox': 316, 'n_words': 70}