128 'HTMLPurifier->addFilter() is deprecated, use configuration directives' .
129 ' in the Filter namespace or Filter.Custom',
132 $this->filters[] = $filter;
159 $context->register(
'Generator', $this->generator);
162 if (
$config->get(
'Core.CollectErrors')) {
166 $context->register(
'Locale', $language);
169 $context->register(
'ErrorCollector', $error_collector);
175 $context->register(
'IDAccumulator', $id_accumulator);
180 $filter_flags =
$config->getBatch(
'Filter');
181 $custom_filters = $filter_flags[
'Custom'];
182 unset($filter_flags[
'Custom']);
184 foreach ($filter_flags as $filter => $flag) {
188 if (strpos($filter,
'.') !==
false) {
191 $class =
"HTMLPurifier_Filter_$filter";
194 foreach ($custom_filters as $filter) {
201 for ($i = 0, $filter_size = count(
$filters); $i < $filter_size; $i++) {
207 $this->generator->generateFromTokens(
209 $this->strategy->execute(
211 $lexer->tokenizeHTML(
222 for ($i = $filter_size - 1; $i >= 0; $i--) {
242 $context_array = array();
243 foreach ($array_of_html as $key => $html) {
247 $this->context = $context_array;
248 return $array_of_html;
263 if (!self::$instance || $prototype) {
265 self::$instance = $prototype;
266 } elseif ($prototype) {