monica
That's indeed the issue(s): there are a few places where the HTMLPurifier creates an instance, there are many many options to the purifier config, and any or all of these can be suitable to certain specific fields only. Clean implementation would open the rabbit hole.
$config = HTMLPurifier_Config::createDefault();
$config->set('Attr.EnableID', true);
$config->set('HTML.Allowed', 'p,sup[id],a[href|id],section[class],ol,li');
$purifier = new HTMLPurifier($config);
could handle this case, but other fields could use other configs.
We try indeed to do minimal changes to core. Main question at this moment was that we might overlook configuration options, and we got that question answered thanks! Complete (clean) implementation might be quit the task for edge-case scenarios.