onx / sanitize
Helper that provides methods for text sanitization.
1.2.2
2023-12-11 13:15 UTC
Requires
- php: ^8.1.0 || ^8.2.0
Requires (Dev)
- illuminate/support: ^11.0@dev
- phpunit/phpunit: ^11.0@dev
This package is not auto-updated.
Last update: 2024-10-01 12:53:14 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!