public function filter($string, HTMLPurifier_Config $config) {
        if (!$string) {
            return $string;
        }
        $config->finalize();
        $purifier = new HTMLPurifier($config);
        $string = $purifier->purify($string);
        return $string;
    }