OutSCIRT

About
Documentation
Downloads

O__sanitize

Purpose: A simple way to sanitize field inputs provided by the end user, to help neutralize unintentional or intentional injection attacks.

Type: Server-side function

Inputs:

  • $inputString: The string to be sanitized.

Outputs: The inputted string is run through some built-in PHP functions to remove tags, neutralize special characters, and escape quotes.

Use Case: A value submitted through a web form can be sanitized prior to processing (e.g., manipulating further or saving).

Examples:

  • Sanitize an input value prior to storing into a string: $mySanitizedString = O__sanitize($_POST["firstName"]);

Version Documented: 20180409