function strip_data($text) { $quotes = array ("alert", "xss", '"', "'", "`", "<!", "<", ">" ); $goodquotes = array ("-", "+", "#" ); $repquotes = array ("\-", "\+", "\#" ); $text = trim( strip_tags( $text ) ); $text = str_replace( $quotes, '', $text ); $text = str_replace( $goodquotes, $repquotes, $text ); $text = preg_replace( "{[ \t]+}", ' ', $text ); return $text; }