PHPackages                             htmlawed/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. [Search &amp; Filtering](/categories/search)
4. /
5. htmlawed/htmlawed

ActiveLibrary[Search &amp; Filtering](/categories/search)

htmlawed/htmlawed
=================

Official htmLawed PHP library for HTML filtering

1.2.15.1(1y ago)401.1M—2.4%17[8 issues](https://github.com/kesar/HTMLawed/issues)7GPL-2.0-or-laterHTMLPHP &gt;=4.4

Since Apr 5Pushed 1y ago5 watchersCompare

[ Source](https://github.com/kesar/HTMLawed)[ Packagist](https://packagist.org/packages/htmlawed/htmlawed)[ Docs](https://bioinformatics.org/phplabware/internal_utilities/htmLawed)[ RSS](/packages/htmlawed-htmlawed/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (12)Used By (7)

HTMLawed is ...
===============

[](#htmlawed-is-)

... a single-file, 45 kb PHP script that makes input text more secure, HTML standards-compliant, and suitable in general from the viewpoint of a web-page administrator, for use in the body of HTML, XHTML or XML documents. A simple HTMLTidy alternative, the htmLawed filter, processor, purifier, sanitizer, beautifier, etc., is highly customizable.

It ensures that HTML tags are balanced and properly nested tags, neutralizes code that may be used for cross-site scripting (XSS) attacks, limits allowed HTML elements, attributes, or URL protocols, tidies the code, and so forth.

As such is may serve as an alternative to [HTMLtidy](http://en.wikipedia.org/wiki/HTML_Tidy) in a sanitation context.

This repository is ...
======================

[](#this-repository-is-)

... a derivative, which closely tracks [the original](http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/)

Links
=====

[](#links)

- The Original: [http://www.bioinformatics.org/phplabware/internal\_utilities/htmLawed/](http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/)
- The SF site where the official Original Releases are available (no cvs/svn/... repository there, though, just releases):
- HTMLawed against RSnake's XSS attack vectors: [http://www.bioinformatics.org/phplabware/internal\_utilities/htmLawed/rsnake/RSnakeXSSTest.htm](http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/rsnake/RSnakeXSSTest.htm)

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity52

Moderate usage in the ecosystem

Community31

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~337 days

Recently: every ~215 days

Total

11

Last Release

693d ago

PHP version history (2 changes)1.1.17PHP &gt;4.4.0

1.2.15PHP &gt;=4.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/257deab5e740bd7c0f3daf9d3edaa316e51149d51fcf7520d1faf084e9d1826a?d=identicon)[kesar](/maintainers/kesar)

![](https://www.gravatar.com/avatar/842d2fe13512e82f0f9b6f0d79dba8eba1595a3cefd31dd51723960436133307?d=identicon)[KorvinSzanto](/maintainers/KorvinSzanto)

---

Top Contributors

[![kesar](https://avatars.githubusercontent.com/u/1288106?v=4)](https://github.com/kesar "kesar (13 commits)")[![KorvinSzanto](https://avatars.githubusercontent.com/u/1007419?v=4)](https://github.com/KorvinSzanto "KorvinSzanto (13 commits)")[![sanmai](https://avatars.githubusercontent.com/u/139488?v=4)](https://github.com/sanmai "sanmai (4 commits)")[![matgargano](https://avatars.githubusercontent.com/u/197298?v=4)](https://github.com/matgargano "matgargano (2 commits)")[![JohnWE](https://avatars.githubusercontent.com/u/2379622?v=4)](https://github.com/JohnWE "JohnWE (2 commits)")[![hakre](https://avatars.githubusercontent.com/u/378849?v=4)](https://github.com/hakre "hakre (2 commits)")[![Simounet](https://avatars.githubusercontent.com/u/582666?v=4)](https://github.com/Simounet "Simounet (1 commits)")[![jtojnar](https://avatars.githubusercontent.com/u/705123?v=4)](https://github.com/jtojnar "jtojnar (1 commits)")[![mlocati](https://avatars.githubusercontent.com/u/928116?v=4)](https://github.com/mlocati "mlocati (1 commits)")[![bikerdave](https://avatars.githubusercontent.com/u/20645740?v=4)](https://github.com/bikerdave "bikerdave (1 commits)")

---

Tags

standardssafehtmlsanitizerfiltertextcleanxsspurifyinputfilteringsanitizecompliancesafetyhtm

### Embed Badge

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

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

###  Alternatives

[outl1ne/nova-input-filter

An input filter for Laravel Nova

24822.7k](/packages/outl1ne-nova-input-filter)[vria/nodiacritic

Tiny helper function that removes all diacritical signs from characters

113.1M13](/packages/vria-nodiacritic)[optimistdigital/nova-input-filter

An input filter for Laravel Nova

24550.6k2](/packages/optimistdigital-nova-input-filter)[kalfheim/sanitizer

Data sanitizer for PHP with built-in Laravel support.

1423.7k](/packages/kalfheim-sanitizer)[lincanbin/white-html-filter

A lightweight php-based HTML tag and attribute whitelist filter.

1215.1k1](/packages/lincanbin-white-html-filter)

PHPackages © 2026

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