====== cleanVar ====== {#JAPI Joomla.Framework Environment JRequest::cleanVar #} 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. ===== Syntax ===== 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: * **JREQUEST_NOTRIM** : Prevents the trimming of the variable * **JREQUEST_ALLOWHTML** : Allows safe HTML in the variable * **JREQUEST_ALLOWRAW** : Allows raw input ===== Examples ===== $dirty = 'Testing cleaning'; echo JRequest::cleanVar ( $dirty );