onx/sanitize

Helper that provides methods for text sanitization.

Installs: 15

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/onx/sanitize

1.2.2 2023-12-11 13:15 UTC

README

Onx Sanitize is a PHP library that provides helper method for text sanitization.

Installation

You can install the package via Composer:

composer require onx/sanitize

Usage

You can use Facade like this:

use Onx\Sanitize\Sanitize;

$text = '  <p>Hello, <strong>world</strong>!</p>  ';
$sanitizedText = Sanitize::text($text);

echo $sanitizedText; // Output: Hello, world!

Or you can also directly use the sanitize function:

$text = '  <p>Hello, <strong>world</strong>!</p>  ';
$sanitizedText = sanitize($text);

echo $sanitizedText; // Output: Hello, world!