CodeExplorer purify example
$textKey =
$hash .
md5($text);
if (isset($this->cache
[$textKey])) { return $this->cache
[$textKey];
} if (!
isset($this->purifiers
[$hash])) { $config =
$this->
getConfig($options,
$override,
$field);
$this->purifiers
[$hash] =
new \
HTMLPurifier($config);
} $this->cache
[$textKey] =
$this->purifiers
[$hash]->
purify($text);
return $this->cache
[$textKey];
} private function getBaseConfig(): \HTMLPurifier_Config
{ $config = \HTMLPurifier_Config::
createDefault();
if ($this->cacheDir !== ''
) { $config->
set('Cache.SerializerPath',
$this->cacheDir
);
}