Currently I am using this code with HTMLPurifier to allow data-*
HTML tag attributes:
$def = $config->getHTMLDefinition(true);
$def->a
It's not a full solution, but I was able to globally white-list individual data-
attributes with the follow code, allowing them to be placed on any element without having to itemize each element type for each attribute.
$def = $config->getHTMLDefinition(true);
$def->info_global_attr['data-aaa-xxx'] = new HTMLPurifier_AttrDef_Text;
$def->info_global_attr['data-bbb-yyy'] = new HTMLPurifier_AttrDef_Text;
$def->info_global_attr['data-ccc-zzz'] = new HTMLPurifier_AttrDef_Text;