Whielist element with class of, using htmlpurifier
- by mcgrailm
I want to only allow the span element only when it has a certain class in htmlpurifier
does anyone know how to do this, right now I have
$config->set('HTML.Allowed','a[href],p,ol,li,ul,img[src],blockquote,em,span[class]');
$config->set('Attr.AllowedClasses',"allowed");
but that allows all spans and only allows class allowed I like that it only allows the "allowed" class but I only want it to allow span when the value of its class is "allowed"
thanks