public static function filterAttribute($value)
    {
        // Check whether current string has already been encoded
        $isEncoded = TextUtils::strModified($value, function($target){
            return self::escape($target);
        });

        // Decode if previous encoded or escaped
        if ($isEncoded) {
            $value = self::charsDecode($value);
        }

        // Convert special characters to make safe use of them
        $value = self::specialChars($value);

        return $value;
    }
public static function filterAttribute($value)
    {
        // Check whether current string has already been encoded
        $isEncoded = TextUtils::strModified($value, function($target){
            return self::escape($target);
        });

        // Decode if previous encoded or escaped
        if ($isEncoded) {
            $value = self::charsDecode($value);
        }

        // Convert special characters to make safe use of them
        $value = self::specialChars($value);

        return $value;
    }
public static function filterAttribute ( $ value ) { // Check whether current string has already been encoded $ isEncoded = TextUtils :: strModified ( $ value , function ( $ target ) { return self :: escape ( $ target ) ; } ) ; // Decode if previous encoded or escaped if ( $ isEncoded ) { $ value = self :: charsDecode ( $ value ) ; } // Convert special characters to make safe use of them $ value = self :: specialChars ( $ value ) ; return $ value ; }
Filters attribute value

@param string $value Attribute value
@return string
Filters attribute value