| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
Environment |
JRequest |
cleanVar |
cleanVar() |
Never | Work in Progress |
Utility method to clean a string variable using input filters. This function operates on strings. If an array is passed, the function recursively calls itself to traverse each element of the array. It will return raw variables which are not strings.
mixed cleanVar ( &$var, $mask )
| $var | mixed | is the variable to clean |
| $mask | int | is an options mask. This parameter is optional and if omitted defaults to 0 (no masks). |
The available masks are:
Example
$dirty = '<B>Testing cleaning<INPUT type="hidden" name="password" value="password" />'; echo JRequest::cleanVar ( $dirty );