Zend_Filter_StripTags ignoring allowed tags and attributes

Posted by Jhorra on Stack Overflow See other posts from Stack Overflow or by Jhorra
Published on 2010-03-28T06:31:40Z Indexed on 2010/03/28 6:33 UTC
Read the original article Hit count: 194

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'));

© Stack Overflow or respective owner

Related posts about zend-framework

Related posts about php