PuneetGopinath / Sanitizers

BK Sanitizers is a community-developed, free and open source library for sanitizing user data in PHP.

Home Page:https://puneetgopinath.github.io/Sanitizers/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

23 May 2021: No longer maintained!!

This package is no longer maintained.

BKS logo

BK Sanitizers (BKS)

Twitter GitHub stars PHP Composer
Quickly Sanitize user data
Welcome

BK Sanitizers is a community-developed, free and open source library for sanitizing user data in PHP.

An acronym/abbreviation for Baal-Krshna Sanitizers is BK Sanitizers.

And an acronym/abbreviation for BK Sanitizers is BKS.

Latest release: GitHub release (latest by date)


Explore:
BK Sanitizers Docs »
BK Sanitizers Wiki »

Report bug(s)ReleasesRequest featureBlog



Join the chat at https://gitter.im/BaalKrshna/Sanitizers Discord Chat

Views


Table of contents

Features

  • Sanitize strings and arrays
  • Namespaced to prevent name clashes
  • PHP 5.3.0 support
  • Examples for how-to use BK Sanitizers
  • Use configuration from ini file
  • Easy to Use
  • And many more...

Quick Start 🚀

  • Clone the repo (if you want to contribute):

  • Using git: git clone https://github.com/PuneetGopinath/Sanitizers.git
  • OR
  • Using github cli: gh repo clone PuneetGopinath/Sanitizers
  • Installation 🔧

Please read INSTALL.md file for The installation guide.

  • Documentation

Please see docs folder.

  • Example Usage

If you are using composer, then replace require "src/BKS.auto.php"; with require "vendor/autoload.php";

<?php
// Import classes
use Sanitizers\Sanitizers\Sanitizer;

require "src/BKS.auto.php";

// passing `true` in Sanitizer class enables exceptions
$sanitizer = new Sanitizer(true);
try {
    echo $sanitizer->sanitize("username", $_GET["username"]);
} catch (Exception $e) {
    echo "Could not Sanitize user input.";
    echo $e->getMessage();
}
?>

Status

This project is currently being maintained. And Will Be Maintained. If You Like This Project And Want This Project To Never Exhaust. Please Consider Donating.

Join the chat at https://gitter.im/BaalKrshna/Sanitizers Discord Chat FOSSA Status Contributor Covenant PHP Composer

GitHub

GitHub commit activity Github Downloads GitHub issues GitHub pull requests GitHub release (latest by date) Snyk Vulnerabilities for GitHub Repo GitHub code size in bytes GitHub repo size

Packagist

Latest Stable Version PHP Support Latest Unstable Version Total Downloads Monthly Downloads Daily Downloads

FAQ

Read the FAQ.md file in docs to understand the frequently asked questions to BKS:

  • What is Sanitize??
  • When and why should I use Sanitizers?
  • And many more...

Files️

Sanitizers/
└── src/
    ├── Sanitizer.php
    └── config.ini
    └── BKS.auto.php
└── test/
    └── SanitizersTest.php
    └── README.md

Prerequisites 📋

See Prerequisites section in INSTALL.md.

Tests ⚙️

Run either composer run-script test or php vendor/bin/phpunit

Contributing

Plz read CONTRIBUTING.md file.

Community 💬

Get updates on Sanitizers's development and chat with the BKS maintainers and community members.

Plz see SUPPORT.md file.

Authors ✒️

See also the list of contributors who participated in building this project.

Supporters

👏 Thank you very much !

You have proved that BK Sanitizers has some value !!

Stargazers

Stargazers for @PuneetGopinath/Sanitizers

Forks

Forkers for @PuneetGopinath/Sanitizers

Contributors

Thanks to all contributors again !!

GitHub Contributors Image

LICENSE 📄

Read LICENSE file. FOSSA Status

Comparing 😕

Are you comparing BKS library with HTMLPurifier ??

Then, you need to know difference between HTMLPurifier and BKS.

  1. HTMLPurifier aims at creating safe and valid HTML as close as possible to a given input. But we aim to cover sanitizing all types of input like name, username, password, etc.

But we always recomend HTMLPurifier for sanitizing html code.

Support Us

Review

BK Sanitizers - Quickly Sanitize user data | Product Hunt

Sponsor

Support BK Sanitizers by becoming a sponsor. Your name will be added manually (by us) below Click here to sponsor.

If your name is not added within 1 week, mail to baalkrshna@gmail.com.

Click here to sponsor:

  1. at patreon
  2. at liberapay
Project sponsored by:
  1. No sponsors, be the first to sponsor now itself by clicking any one of the above links!

Spread

Help spread awareness about BK Sanitizers by:

  • Twitter: Share at Twitter

  • Facebook: Share at Facebook

  • Linkedin: Share at Linkedin

  • Pinterest: Share at Pinterest

  • Email: Share at Email

Versioning

We use Semantic Versioning for our library.

Conclusion 🏁

If you sanitize user input then, you will be able to manage data properly, validate it, show it in a secure and reliable way.

It makes your web application trustworthy, so it must be one of your main goals from the beginning of your career as a web developer.

Some people also disagree with sanitizing input, they say sanitizing output is the best, if you want to sanitize output, then you can use the clean function

About

BK Sanitizers is a community-developed, free and open source library for sanitizing user data in PHP.

https://puneetgopinath.github.io/Sanitizers/

License:MIT License


Languages

Language:PHP 100.0%