But as HTMLPurifier does not accept Zend_Config instances but arrays, I would need to call Zend_Config::toArray() instead of injecting. So, instead of injecting the object itself, it would inject the resulting array.
I've for now worked around it with:
class My_HTMLPurifier extends HTMLPurifier
{
public function __construct($config = null)
{
if (null !== $config) {
if ($config instanceof Zend_Config) {
// HTMLPurifier will not accept a Zend_Config-type object
// cast to array
$config = $config->toArray();
}
}
parent::__construct($config);
}
}
and setting htmlPurifier.class to My_HTMLPurifier which also seems like an OK solution for now.
This isn't a bug, more like a RFC. :)
I'm trying to setup HTMLPurifier like so:
But as HTMLPurifier does not accept Zend_Config instances but arrays, I would need to call Zend_Config::toArray() instead of injecting. So, instead of injecting the object itself, it would inject the resulting array.
I've for now worked around it with:
and setting htmlPurifier.class to My_HTMLPurifier which also seems like an OK solution for now.
Thoughts?