#isU', '', $text); // clean tags $tagarray = array('img', 'a', 'strong', 'b', 'em', 'i', 'u', 's', 'br', 'p'); foreach ($tagarray AS $tag) { $goodtags .= '<' . $tag . '>'; } // remove js attributes $text = preg_replace('#href=("|\'|")javascript:(.*?)\\1#i', 'href="ja"', $text); $text = strip_tags($text, $goodtags); return $text; } // ##################### Start process_safe_html ##################### // this removes any attempts to use type things function process_safe_html($text) { //$text = preg_replace('#javascript#i', 'java script', $text); $text = preg_replace('##isU', '', $text); return $text; } // ###################### Start process_all_html ##################### // say goodbye to anything in a tag function process_all_html($text) { $text = preg_replace('##', '', $text); $text = strip_tags($text); return $text; } // ##################### Start process_post_html ##################### function process_post_html($text, $allowraw = 0, $allowsafe = 1) { if ($allowraw) { return $text; } if ($allowsafe) { $text = process_raw_html($text); return $text; } if (!$allow AND !$allowsafe) { $text = process_raw_html($text); $text = process_all_html($text); return $text; } } /*=====================================================================*\ || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ ?>