private function _allowTags($html, $tags_str) { $tagsArr = $this->_tag($tags_str); $html = $this->_removeTags($html, $tagsArr[1]); $allow = ''; foreach ($tagsArr[0] as $tag) { $allow .= "<{$tag}> "; } return strip_tags(trim($html), $allow); }