Hi

I want to filter a form input for html/php tags.

So far I've got this.

<?
$text = "<test> after a couple of spaces";
echo nl2br(ereg_replace(" ", "&nbsp;", strip_tags($text)));
?>

If the $text contains a " (double quot charachter) the script will produce a parse error. Does someone know a solution for this?

Thanx in advance