Question

I want to use and tags as well as some custom tags (for example , ) with HTMLPurifier. I used

$config->set('HTML.Allowed','audio, video');

to add those tags but received warning that they are not standard and the tags are stripped out.

Was it helpful?

Solution

HTML Purifier doesn't support HTML5 yet, so that won't do. You can try to jerry-rig something with http://htmlpurifier.org/docs/enduser-customize.html but audio and video might be a bit fiddly to do correctly. Note also that even if audio and video were allowed, you're not allowing any attributes or other tags, which is probably not what you want.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top