public static function textCleaner($input, $joker = '_', $maxLength = -1)
    {
        $returnValue = '';

        $randJoker = ($joker == '*');
        $length =  ((defined('TAO_DEFAULT_ENCODING')) ? mb_strlen($input, TAO_DEFAULT_ENCODING) : mb_strlen($input));
        if($maxLength > -1 ){
            $length = min($length, $maxLength);
        }

		$i = 0;
		while ($i < $length){
			if (preg_match("/^[a-zA-Z0-9_-]{1}$/u", $input[$i])){
				$returnValue .= $input[$i];
			}
			else{
				if ($input[$i] == ' '){
					$returnValue .= '_';
				}
				else{
					$returnValue .= ((true === $randJoker) ? chr(rand(97, 122)) : $joker);
				}
			}
			$i++;
		}

        return (string) $returnValue;
    }