Table of Contents
Cake comes with Sanitize, a class you can use to rid user-submitted data of malicious attacks and other unwanted data. Sanitize is a core library, so it can be used anywhere inside of your code, but is probably best used in controllers or models.
// First, include the core library:
uses('sanitize');
// Next, create a new Sanitize object:
$mrClean = new Sanitize();
// From here, you can use Sanitize to clean your data
// (These methods explained in the next section)