php - Strip HTML Tags in Zend Framework -
i trying strip html tags except <p>,<br>,<strong>,<b>
input data following:
public function init() { parent::init(); $this->fields = array( 'name' => 'name', 'age' => 'age', 'profile' => 'profile', ); $this->mdata = array(); $this->verify = true; }
anyone knows how apply zend_filter_striptags in it?
if understand problem:
$allowedtags = array('p','b','br','strong'); // allowed tags $allowedattributes = array('href'); // allowed attributes $striptags = new zend_filter_striptags($allowedtags,$allowedattributes); // instance of zend filter $sanitizedinput = $striptags->filter($input); //$input input html
Comments
Post a Comment