PHPackages                             rothkj1022/php-xss-sanitizer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. rothkj1022/php-xss-sanitizer

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

rothkj1022/php-xss-sanitizer
============================

PHP XSS Sanitizer uses HTMLPurifier to recursively clean up get, post, and files arrays to protect your application.

1.0.1(4y ago)0141[1 issues](https://github.com/rothkj1022/php-xss-sanitizer/issues)MITPHPPHP ^5.4 || ^7.0 || ^8.0

Since Nov 1Pushed 4y ago1 watchersCompare

[ Source](https://github.com/rothkj1022/php-xss-sanitizer)[ Packagist](https://packagist.org/packages/rothkj1022/php-xss-sanitizer)[ RSS](/packages/rothkj1022-php-xss-sanitizer/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

php-xss-sanitizer
=================

[](#php-xss-sanitizer)

PHP XSS Sanitizer uses HTMLPurifier to recursively clean up get, post, and files arrays to protect your application.

### Features:

[](#features)

- Recursively sanitizes $\_GET, $\_POST, $\_FILES, or any other php array
- Option to sanitize file names if passing the $\_FILES array
- Set any HTMLPurifier config parameters you want to use

Written by: Kevin Roth -

### License

[](#license)

Released under the MIT license -

Requirements
------------

[](#requirements)

- PHP &gt;= 5.4

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

[](#installation)

Run the following command in your command line shell in your php project

```
$ composer require rothkj1022/php-xss-sanitizer
```

Done.

Getting started
---------------

[](#getting-started)

### Example usage with composer

[](#example-usage-with-composer)

```
require('vendor/autoload.php');
use rothkj1022\Sanitizer;

$sanitizer = new Sanitizer\Sanitizer();
```

### Example usage without composer

[](#example-usage-without-composer)

```
require('src/Sanitizer.php');
use rothkj1022\Sanitizer;

$sanitizer = new Sanitizer\Sanitizer();
```

See example.php

Changelog
---------

[](#changelog)

### Version 1.0.0

[](#version-100)

- Initial version

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1141 days

Total

2

Last Release

1660d ago

PHP version history (2 changes)1.0.0PHP ^5.4 || ^7.0

1.0.1PHP ^5.4 || ^7.0 || ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1591839?v=4)[Kevin Roth](/maintainers/rothkj1022)[@rothkj1022](https://github.com/rothkj1022)

---

Top Contributors

[![rothkj1022](https://avatars.githubusercontent.com/u/1591839?v=4)](https://github.com/rothkj1022 "rothkj1022 (3 commits)")[![krothapigroup](https://avatars.githubusercontent.com/u/146483151?v=4)](https://github.com/krothapigroup "krothapigroup (1 commits)")

### Embed Badge

![Health badge](/badges/rothkj1022-php-xss-sanitizer/health.svg)

```
[![Health](https://phpackages.com/badges/rothkj1022-php-xss-sanitizer/health.svg)](https://phpackages.com/packages/rothkj1022-php-xss-sanitizer)
```

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5396.5M34](/packages/stevebauman-purify)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.1k17.8k](/packages/prestashop-prestashop)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[jason-munro/cypht

Lightweight Open Source webmail written in PHP and JavaScript

1.6k157.9k](/packages/jason-munro-cypht)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
