PHPackages                             ircmaxell/stauros - 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. [Security](/categories/security)
4. /
5. ircmaxell/stauros

ActiveLibrary[Security](/categories/security)

ircmaxell/stauros
=================

A fast XSS cleaner for PHP

11812.4k10[2 PRs](https://github.com/ircmaxell/Stauros/pulls)PHP

Since Sep 3Pushed 9y ago17 watchersCompare

[ Source](https://github.com/ircmaxell/Stauros)[ Packagist](https://packagist.org/packages/ircmaxell/stauros)[ RSS](/packages/ircmaxell-stauros/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Stauros
=======

[](#stauros)

[![Build Status](https://camo.githubusercontent.com/9fee12e1582f87acd6836afd6ce9cbfb23598f4fe651edb18089899cf4210fbf/68747470733a2f2f7472617669732d63692e6f72672f6972636d6178656c6c2f53746175726f732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ircmaxell/Stauros)

A fast XSS sanitation library for PHP.

\##IMPORTANT

**THIS IS AN EXPERIMENTAL LIBRARY, USE AT YOUR OWN RISK**
=========================================================

[](#this-is-an-experimental-library-use-at-your-own-risk)

How to use it
-------------

[](#how-to-use-it)

With the default settings, simply call `Stauros->scanHTML()`:

```
$stauros = new Stauros;
$clean = $stauros->scanHTML($dirty);

```

Easy as that

Working with streams
--------------------

[](#working-with-streams)

Stauros supports streaming content as well. You can use a stream as input, getting a string as output:

```
$clean = $stauros->scanHTMLStreamToString($stream);

```

Or you can use it as a stream to stream process:

```
$stauros->scanHTMLStreamToStream($input, $output);

```

Advanced Usage
--------------

[](#advanced-usage)

The configuration class (`Stauros\HTML\Config`) allows you to specify html tag whitelists, as well as attribute whitelist and implement an attribute callback for further customization.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c87a667fe5a109ed083ba784409a76f0a18f30b0a05445fbb8ef5e4520b7a6e1?d=identicon)[ircmaxell](/maintainers/ircmaxell)

---

Top Contributors

[![ircmaxell](https://avatars.githubusercontent.com/u/660654?v=4)](https://github.com/ircmaxell "ircmaxell (5 commits)")

### Embed Badge

![Health badge](/badges/ircmaxell-stauros/health.svg)

```
[![Health](https://phpackages.com/badges/ircmaxell-stauros/health.svg)](https://phpackages.com/packages/ircmaxell-stauros)
```

###  Alternatives

[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k18.0M134](/packages/mews-purifier)[paragonie/ecc

PHP Elliptic Curve Cryptography library

24772.0k35](/packages/paragonie-ecc)

PHPackages © 2026

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