PHPackages                             eyupcanakman/htmlawed - 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. eyupcanakman/htmlawed

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

eyupcanakman/htmlawed
=====================

PHP 8.4+ compatible fork of vanilla/htmlawed — a composer wrapper for the htmLawed library to purify &amp; filter HTML.

v3.0.0(3mo ago)0247LGPL-3.0PHPPHP &gt;=8.1

Since Mar 7Pushed 3mo agoCompare

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

READMEChangelogDependenciesVersions (2)Used By (0)

htmlawed
========

[](#htmlawed)

PHP 8.4+ compatible fork of [vanilla/htmlawed](https://github.com/vanilla/htmlawed).

A composer wrapper for the [htmLawed](http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/) library to purify &amp; filter HTML.

Why this fork?
--------------

[](#why-this-fork)

The original `vanilla/htmlawed` (v2.2.15, Sep 2023) is unmaintained and triggers PHP 8.4 deprecation notices due to implicit nullable parameters. These deprecation notices produce output that breaks HTTP headers in API responses.

### Changes from vanilla/htmlawed v2.2.15

[](#changes-from-vanillahtmlawed-v2215)

- Added explicit nullable type hints to `Htmlawed::filter()` (`?array $config`, `string|array|null $spec`)
- Added parameter and return types to `Htmlawed::filter()` and `Htmlawed::filterRSS()`
- Bumped minimum PHP requirement to 8.1
- No changes to the htmLawed core library (`htmLawed.php`)

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

[](#installation)

Requires PHP 8.1+.

```
composer require eyupcanakman/htmlawed
```

If you're migrating from `vanilla/htmlawed`:

```
composer require eyupcanakman/htmlawed
composer remove vanilla/htmlawed
```

Usage
-----

[](#usage)

```
echo Htmlawed::filter('Hello world!');
// Outputs: 'Hello world!'

echo Htmlawed::filter('nothing to seealert("xss")');
// Outputs: 'nothing to seealert("xss")'

// RSS filtering
echo Htmlawed::filterRSS('Hello world!');
// Outputs: 'Hello world!'
```

See the [htmLawed documentation](http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/htmLawed_README.htm#s2.2) for the full list of config and spec options.

Credits
-------

[](#credits)

- **Todd Burry / Vanilla Forums** — original [vanilla/htmlawed](https://github.com/vanilla/htmlawed) composer wrapper
- **Santosh Patnaik** — [htmLawed](http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/) core library

License
-------

[](#license)

LGPL-3.0 (same as the original package)

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance79

Regular maintenance activity

Popularity14

Limited adoption so far

Community6

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

109d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/40c1e68364fcfad49a629d56d0ed1579991a026636dc8c306db0f18dbee85199?d=identicon)[eyupcanakman](/maintainers/eyupcanakman)

---

Top Contributors

[![eyupcanakman](https://avatars.githubusercontent.com/u/1732357?v=4)](https://github.com/eyupcanakman "eyupcanakman (1 commits)")

### Embed Badge

![Health badge](/badges/eyupcanakman-htmlawed/health.svg)

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

###  Alternatives

[chaoswey/taiwan-id-validator

台灣身分證、統一編號驗證

319.9k](/packages/chaoswey-taiwan-id-validator)

PHPackages © 2026

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