Zend_Filter_StripTags ignoring allowed tags and attributes
- by Jhorra
I'm trying to use the following code and it still strips out all the tags. Am I doing something wrong? I'm using the newest V1.10
$allowed_tags = array('img', 'object', 'param', 'embed', 'a', 'href', 'p', 'br', 'em', 'strong', 'li', 'ol', 'span');
$allowed_attributes = array('style', 'src', 'alt', 'href', 'width', 'height', 'value', 'name', 'type', 'embed', 'quality', 'pluginspage');
Zend_Loader::loadClass('Zend_Filter_StripTags');
$html_filter = new Zend_Filter_StripTags($allowed_tags, $allowed_attributes);
$post = $html_filter->filter($this->_request->getPost('post'));