erlandmuchasaj / sanitize
A package to sanitize your input.
Installs: 3 563
Dependents: 0
Suggesters: 0
Security: 0
Stars: 13
Watchers: 4
Forks: 0
Open Issues: 0
Requires
- php: ^7.3|^7.4|^8.0|^8.1|^8.2
README
This is a PHP package that helps to sanitize your input when performing search queries to DB. It cleans the input from all malicious characters.
Installation
You can install the package via composer:
composer require erlandmuchasaj/sanitize
Usage
Sanitize library offers a sanitize method that takes a parameter a dirty string parameter and return a cleaned string.
use ErlandMuchasaj\Sanitize\Sanitize; $dirtyString = 'Hello - World'; $sanitizedString = Sanitize::sanitize($dirtyString); // do something with the sanitized text // you can: $words = explode(' ', $sanitizedString); // and search the DB per each word.
Support me
I invest a lot of time and resources into creating best in class open source packages.
If you found this package helpful you can show support by clicking on the following button below and donating some amount to help me work on these projects frequently.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please see SECURITY for details.
Credits
License
The MIT License (MIT). Please see License File for more information.