burzum / cakephp-html-purifier

This is a CakePHP wrapper for the HTML Purifier lib. The plugin includes a trait, a view helper, a behavior and a shell to clean your markup wherever you like, in the view or in the model layer or clean any table and field using the shell.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Anchor Tag "Name" Attribute Stripped out when Allowed

kriskd opened this issue · comments

If the name attribute of the anchor tag (example: <a name="whatever"></a>) is included in HTML.AllowedAttributes it is still stripped out. I added this condition to the Test file and the test failed.

I don't think that's a problem of the plugin, the plugin is just a proxy. Can you test if that filter rule works with the Purifier lib itself?

Thanks, a little reading of the HTML Purifier documentation and I think I have fixed it. I simple had to add 'Attr.EnableID' => true to my Purifier config and now the name attribute is maintained.