PHPackages                             dena-a/xss-transformer - 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. dena-a/xss-transformer

ActiveLibrary[Security](/categories/security)

dena-a/xss-transformer
======================

a PHP and Laravel package to transform strings to prevent xss injection

11PHP

Since Dec 8Pushed 3y ago1 watchersCompare

[ Source](https://github.com/dena-a/xss-transformer)[ Packagist](https://packagist.org/packages/dena-a/xss-transformer)[ RSS](/packages/dena-a-xss-transformer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

XssTransformer
==============

[](#xsstransformer)

a PHP and Laravel package to transform strings to prevent xss injection

[![Latest Stable Version](https://camo.githubusercontent.com/d84552716d68a1b5aab7b7b4e37b1e371ae955b52cfe539abad36087ffee7f59/68747470733a2f2f706f7365722e707567782e6f72672f64656e612d612f7873732d7472616e73666f726d65722f76)](https://packagist.org/packages/dena-a/xss-transformer)[![Total Downloads](https://camo.githubusercontent.com/575e1e94605e0d3c85a8c53e7ad1bc528970a1636b95f6cdb8997cb347abe528/68747470733a2f2f706f7365722e707567782e6f72672f64656e612d612f7873732d7472616e73666f726d65722f646f776e6c6f616473)](https://packagist.org/packages/dena-a/xss-transformer)[![Latest Unstable Version](https://camo.githubusercontent.com/a4786848297c28027886221ae024bdb7fdb56849f9d78a077cc194273d0dc63d/68747470733a2f2f706f7365722e707567782e6f72672f64656e612d612f7873732d7472616e73666f726d65722f762f756e737461626c65)](https://packagist.org/packages/dena-a/xss-transformer)[![License](https://camo.githubusercontent.com/479d4ffd9fe092b0b62f0e7bcfa4dc1fd4dadea1fcbb4e68b5a55ad15c0c376c/68747470733a2f2f706f7365722e707567782e6f72672f64656e612d612f7873732d7472616e73666f726d65722f6c6963656e7365)](https://packagist.org/packages/dena-a/xss-transformer)

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

[](#requirements)

- PHP &gt;= 7.4

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

[](#installation)

Add the package to your composer file via the `composer require` command:

```
$ composer require dena-a/xss-transformer:^0.1
```

Or add it to `composer.json` manually:

```
"require": {
    "dena-a/xss-transformer": "^0.1"
}
```

### Laravel\\Lumen

[](#laravellumen)

1. XssTransformer's service providers will be automatically registered using Laravel's auto-discovery feature.

    > Note: For Lumen you have to add the XssTransformer service provider manually to: `bootstrap/app.php` :

    ```
    $app->register(Dena\XssTransformer\Laravel\XssTransformerServiceProvider::class);
    ```
2. Publish the config-file with:

    ```
    php artisan vendor:publish --provider="Dena\XssTransformer\Laravel\XssTransformerServiceProvider"
    ```

Usage
-----

[](#usage)

TODO:

Contribute
----------

[](#contribute)

Contributions are always welcome!

Support
-------

[](#support)

If you believe you have found a bug, please report it using the [GitHub issue tracker](https://github.com/dena-a/xss-transformer/issues), or better yet, fork the library and submit a pull request.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 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/3acb8478bf68a89f8b96580001aa6759ec71ab51346c61823f3007a3ae79c4fb?d=identicon)[dena-a](/maintainers/dena-a)

---

Top Contributors

[![dena-a](https://avatars.githubusercontent.com/u/4950968?v=4)](https://github.com/dena-a "dena-a (3 commits)")

### Embed Badge

![Health badge](/badges/dena-a-xss-transformer/health.svg)

```
[![Health](https://phpackages.com/badges/dena-a-xss-transformer/health.svg)](https://phpackages.com/packages/dena-a-xss-transformer)
```

###  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)[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)[enlightn/security-checker

A PHP dependency vulnerabilities scanner based on the Security Advisories Database.

33732.2M110](/packages/enlightn-security-checker)

PHPackages © 2026

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