How to customize HTML Purifier? HTML Purifier is deleting a custom link attribute. As I understand the HTML Purifier docs, it should be possible to customize it to allow a defined attribute. Is there in Craft CMS a defined way for doing such a customizing (like the Redactor configuration)?

Thank you very much for your help!

Edit: Would probably possible in "RichTextFieldType.php" (Line 205ff)?
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);