How to customize HTML Purifier?
There's no way to configure the default Rich Text Field's use of HTMLPurifier, unfortunately, though it has been brought up before and is on our list to look at exposing to a config file post Craft 3 launch.

Your custom plugin could create it's own CHtmlPurifier instance and configure it however you want, though.

$purifier = new \CHtmlPurifier();
$purifier-&gt;setOptions(array(
    'Attr.AllowedFrameTargets' =&gt; array('_blank'),
    'HTML.AllowedComments' =&gt; array('pagebreak'),
    ...
));

$value = $purifier-&gt;purify($value);