... blocks and other HTML tags to try and // detect if we have any actual output. Used by the collapse code to try // and make sure we don't add spurious collapse boxes. // Also used by the rename code to remove HTML that some admins try to // insert.. Bah function sanitize_html($str) { //take out script blocks $str = preg_replace("/]*>.+<\\/script[^>]*>/", "", $str); //take out css blocks $str = preg_replace("/]*>.+<\\/style[^>]*>/", "", $str); //take out comments $str = preg_replace("//", "", $str); $str = strip_tags($str); return $str; } ?>