I'm moving a project to Symfony4 from other framework where it defined like so:
<?php
namespace A\Namespace;
class HTMLPurifierConfig extends \HTMLPurifier_Config
{
public static function create($config, $schema = null)
{
$ret = parent::create($config, $schema);
$def = $ret->getHTMLDefinition(true);
$def->info_tag_transform['div'] = new \HTMLPurifier_TagTransform_Simple('p');
$def->info_tag_transform['h1'] = new \HTMLPurifier_TagTransform_Simple('h4');
$def->info_tag_transform['h2'] = new \HTMLPurifier_TagTransform_Simple('h5');
$def->info_tag_transform['h3'] = new \HTMLPurifier_TagTransform_Simple('h6');
...
Is it possible to introduce a config setting to override standard \HTMLPurifier_Config with a custom one from bundle config?
I'm moving a project to Symfony4 from other framework where it defined like so:
Is it possible to introduce a config setting to override standard \HTMLPurifier_Config with a custom one from bundle config?