protected static function get_filter_config(array $whitelists, array $excludelists) : string {
        $filters = '';
        if (!empty($whitelists)) {
            $filters .= self::pad("<whitelist>", 2);
            foreach ($whitelists as $line) {
                $filters .= self::pad($line, 3);
            }
            if (!empty($excludelists)) {
                $filters .= self::pad("<exclude>", 3);
                foreach ($excludelists as $line) {
                    $filters .= self::pad($line, 4);
                }
                $filters .= self::pad("</exclude>", 3);
            }
            $filters .= self::pad("</whitelist>", 2);
        }

        return $filters;
    }