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 

see answer


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -