PHPackages                             digiaonline/common-sanitization-stages - 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. digiaonline/common-sanitization-stages

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

digiaonline/common-sanitization-stages
======================================

A collection of pipeline stages that are commonly needed when sanitizing data

1.2.0(7y ago)037.4k↓50%1MITPHPPHP &gt;=7.1

Since Jun 25Pushed 7y ago4 watchersCompare

[ Source](https://github.com/digiaonline/common-sanitization-stages)[ Packagist](https://packagist.org/packages/digiaonline/common-sanitization-stages)[ RSS](/packages/digiaonline-common-sanitization-stages/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (6)Used By (0)

common-sanitization-stages
==========================

[](#common-sanitization-stages)

[![Build Status](https://camo.githubusercontent.com/5f9f92b8ee500b15683b10eee06702e09b1a7262ab470c41bb1c2ccc8b157f74/68747470733a2f2f7472617669732d63692e6f72672f64696769616f6e6c696e652f636f6d6d6f6e2d73616e6974697a6174696f6e2d7374616765732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/digiaonline/common-sanitization-stages)[![Coverage Status](https://camo.githubusercontent.com/e24cc617f1249096d17ab8c297f67e8b79c20956aa56b240bef228cedaa8befe/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f64696769616f6e6c696e652f636f6d6d6f6e2d73616e6974697a6174696f6e2d7374616765732f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/digiaonline/common-sanitization-stages?branch=master)

A collection of pipeline stages that are commonly needed when sanitizing data

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

[](#requirements)

- PHP &gt;= 7.1

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

[](#installation)

```
composer require digiaonline/common-sanitization-stages
```

Usage
-----

[](#usage)

Let's say you're importing some legacy data into a new system. The original data is user generated content, so it cannot be trusted. Additionally, it contains some simple HTML that you want to strip. On top of all this, the legacy data must be possible to store in a CSV file, so you need to encode it somehow so the CSV delimiter is guaranteed not to occur in the text value.

To accomplish this, just combine the stages you need into a pipeline, then run the pipeline against your data:

```
