PHPackages                             nopoco/laminas-escaper - 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. nopoco/laminas-escaper

ActiveLibrary[Security](/categories/security)

nopoco/laminas-escaper
======================

Securely and safely escape HTML, HTML attributes, JavaScript, CSS, and URLs

v2.12.0(3y ago)025BSD-3-ClausePHPPHP ^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0

Since May 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/nopoco/laminas-escaper)[ Packagist](https://packagist.org/packages/nopoco/laminas-escaper)[ Docs](https://laminas.dev)[ RSS](/packages/nopoco-laminas-escaper/feed)WikiDiscussions 2.12.x Synced 1mo ago

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

laminas-escaper
===============

[](#laminas-escaper)

> Removed political appeal incompatible with free software here. The original repository is at this [link](https://github.com/laminas/laminas-escaper).

The OWASP Top 10 web security risks study lists Cross-Site Scripting (XSS) in second place. PHP’s sole functionality against XSS is limited to two functions of which one is commonly misapplied. Thus, the laminas-escaper component was written. It offers developers a way to escape output and defend from XSS and related vulnerabilities by introducing contextual escaping based on peer-reviewed rules.

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

[](#installation)

Run the following to install this library:

```
$ composer require laminas/laminas-escaper
```

Documentation
-------------

[](#documentation)

Browse the documentation online at

Support
-------

[](#support)

- [Issues](https://github.com/laminas/laminas-escaper/issues/)
- [Chat](https://laminas.dev/chat/)
- [Forum](https://discourse.laminas.dev/)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.9% 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 ~0 days

Total

2

Last Release

1103d ago

### Community

Maintainers

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

---

Top Contributors

[![weierophinney](https://avatars.githubusercontent.com/u/25943?v=4)](https://github.com/weierophinney "weierophinney (4203 commits)")[![Maks3w](https://avatars.githubusercontent.com/u/1301698?v=4)](https://github.com/Maks3w "Maks3w (535 commits)")[![Ocramius](https://avatars.githubusercontent.com/u/154256?v=4)](https://github.com/Ocramius "Ocramius (360 commits)")[![EvanDotPro](https://avatars.githubusercontent.com/u/5607?v=4)](https://github.com/EvanDotPro "EvanDotPro (153 commits)")[![akrabat](https://avatars.githubusercontent.com/u/33135?v=4)](https://github.com/akrabat "akrabat (112 commits)")[![ezimuel](https://avatars.githubusercontent.com/u/475967?v=4)](https://github.com/ezimuel "ezimuel (80 commits)")[![michalbundyra](https://avatars.githubusercontent.com/u/7423207?v=4)](https://github.com/michalbundyra "michalbundyra (61 commits)")[![marc-mabe](https://avatars.githubusercontent.com/u/302689?v=4)](https://github.com/marc-mabe "marc-mabe (38 commits)")[![ralphschindler](https://avatars.githubusercontent.com/u/76674?v=4)](https://github.com/ralphschindler "ralphschindler (35 commits)")[![sgehrig](https://avatars.githubusercontent.com/u/43394?v=4)](https://github.com/sgehrig "sgehrig (33 commits)")[![Freeaqingme](https://avatars.githubusercontent.com/u/33034?v=4)](https://github.com/Freeaqingme "Freeaqingme (24 commits)")[![DASPRiD](https://avatars.githubusercontent.com/u/233300?v=4)](https://github.com/DASPRiD "DASPRiD (23 commits)")[![gsteel](https://avatars.githubusercontent.com/u/2803720?v=4)](https://github.com/gsteel "gsteel (21 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (20 commits)")[![mwillbanks](https://avatars.githubusercontent.com/u/38209?v=4)](https://github.com/mwillbanks "mwillbanks (16 commits)")[![padraic](https://avatars.githubusercontent.com/u/19780?v=4)](https://github.com/padraic "padraic (14 commits)")[![ghostwriter](https://avatars.githubusercontent.com/u/9754361?v=4)](https://github.com/ghostwriter "ghostwriter (13 commits)")[![Thinkscape](https://avatars.githubusercontent.com/u/270528?v=4)](https://github.com/Thinkscape "Thinkscape (12 commits)")[![bakura10](https://avatars.githubusercontent.com/u/1198915?v=4)](https://github.com/bakura10 "bakura10 (11 commits)")[![samsonasik](https://avatars.githubusercontent.com/u/459648?v=4)](https://github.com/samsonasik "samsonasik (11 commits)")

---

Tags

laminasescaper

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/nopoco-laminas-escaper/health.svg)

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

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M212](/packages/defuse-php-encryption)[roave/security-advisories

Prevents installation of composer packages with known security vulnerabilities: no API, simply require it

2.9k97.3M6.4k](/packages/roave-security-advisories)[mews/purifier

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

2.0k16.7M112](/packages/mews-purifier)[laminas/laminas-escaper

Securely and safely escape HTML, HTML attributes, JavaScript, CSS, and URLs

22088.6M140](/packages/laminas-laminas-escaper)[robrichards/xmlseclibs

A PHP library for XML Security

41278.1M118](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

86917.5M63](/packages/bjeavons-zxcvbn-php)

PHPackages © 2026

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