$tagname) { foreach ($blacklist as $bad_tagname) { if ($tagname == $bad_tagname) { array_splice($list, $key, 1); } } } foreach ($list as $key => $tagname) { $list[$key] = '<'.$tagname.'>'; } return implode($list); } /** * * Filter the tags out of a string using the default whitelist. * * @param str $value The html content to be filtered through * * @return str The filtered html * **/ public static function filter($value) { return strip_tags($value, self::create_whitelist()); } /** * * Filter the tags out of a string using a blacklist. * * @param str $value The html content to be filtered through * @param mix $value The html content to be filtered through * * @return str The filtered html * **/ public static function remove_tags($value, $blacklist) { return strip_tags($value, self::create_whitelist($blacklist)); } }