Public Member Functions | |
| stripAll ($str) | |
Static Public Member Functions | |
| clean ($data, $options=array()) | |
| escape ($string, $connection= 'default') | |
| formatColumns (&$model) | |
| html ($string, $remove=false) | |
| paranoid ($string, $allowed=array()) | |
| stripImages ($str) | |
| stripScripts ($str) | |
| stripTags () | |
| stripWhitespace ($str) | |
Definition at line 36 of file sanitize.php.
| Sanitize::clean | ( | $ | data, | |
| $ | options = array() | |||
| ) | [static] |
Sanitizes given array or value for safe input. Use the options to specify the connection to use, and what filters should be applied (with a boolean value). Valid filters: odd_spaces, encode, dollar, carriage, unicode, escape, backslash.
| mixed | $data Data to sanitize | |
| mixed | $options If string, DB connection being used, otherwise set of options |
Definition at line 182 of file sanitize.php.
Referenced by ErrorHandler::__construct().
| Sanitize::escape | ( | $ | string, | |
| $ | connection = 'default' | |||
| ) | [static] |
Makes a string SQL-safe.
| string | $string String to sanitize | |
| string | $connection Database connection being used |
Definition at line 72 of file sanitize.php.
References ConnectionManager::getDataSource().
| Sanitize::formatColumns | ( | &$ | model | ) | [static] |
Formats column data from definition in DBO's $columns array
| Model | $model The model containing the data to be formatted public |
Definition at line 244 of file sanitize.php.
| Sanitize::html | ( | $ | string, | |
| $ | remove = false | |||
| ) | [static] |
Returns given string safe for display as HTML. Renders entities.
| string | $string String from where to strip tags | |
| boolean | $remove If true, the string is stripped of all HTML tags |
Definition at line 90 of file sanitize.php.
| Sanitize::paranoid | ( | $ | string, | |
| $ | allowed = array() | |||
| ) | [static] |
Removes any non-alphanumeric characters.
| string | $string String to sanitize |
Definition at line 45 of file sanitize.php.
| Sanitize::stripAll | ( | $ | str | ) |
Strips extra whitespace, images, scripts and stylesheets from output
| string | $str String to sanitize |
Definition at line 144 of file sanitize.php.
| Sanitize::stripImages | ( | $ | str | ) | [static] |
Strips image tags from output
| string | $str String to sanitize |
Definition at line 120 of file sanitize.php.
| Sanitize::stripScripts | ( | $ | str | ) | [static] |
Strips scripts and stylesheets from output
| string | $str String to sanitize |
Definition at line 134 of file sanitize.php.
| Sanitize::stripTags | ( | ) | [static] |
Strips the specified tags from output. First parameter is string from where to remove tags. All subsequent parameters are tags.
| string | $str String to sanitize | |
| string | $tag Tag to remove (add more parameters as needed) |
Definition at line 160 of file sanitize.php.
| Sanitize::stripWhitespace | ( | $ | str | ) | [static] |
Strips extra whitespace from output
| string | $str String to sanitize |
Definition at line 108 of file sanitize.php.
1.4.7