erlandmuchasaj / sanitize

A package to sanitize your input.

Home Page:https://github.com/erlandmuchasaj/sanitize

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP sanitize

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.

buy me a coffee

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.

About

A package to sanitize your input.

https://github.com/erlandmuchasaj/sanitize

License:MIT License


Languages

Language:PHP 100.0%