Hi Deborah,
Thanks for posting! htmlPurify() is a CMSB function that was added in version 2.51 which allows you to strip out unwanted tags from any HTML string. You can use it like this:
$cleanHTML = htmlPurify($dirtyHtml);
When you do it like this, the default functionality is to strip out all tags except for
- a
- b
- strong
- i
- em
- strike
- br
- p
You can change this list by passing in a $config array that specifies which tags you would like to keeps An example would look like this:
$config = array(); // Config options: http://htmlpurifier.org/live/configdoc/plain.html
$config['HTML.Allowed'] = 'a[href],b,strong,i,em,u,blockquote,code,strike,br,hr,p,span[style],ul,ol,li,blockquote,code';
$cleanHtml = htmlPurify($dirtyHtml, $config);
As for the next release, we have a number of new features in the works, but as these are still under development, we don't yet have a finalized features list. Stay tuned!
Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/